neuron_morphology.features.intrinsic module

neuron_morphology.features.intrinsic.calculate_branches_from_root(morphology, root, node_types=None)[source]

Calculate the number of branches of a specific neuron type in a morphology. A branch is defined as being between two bifurcations or between a bifurcation and a tip if a node has three or more children, it is treated as succesive bifurcations, e.g a trifurcation: _/_/__ creates 4 branches since the branch between the two bifurcations counts

Parameters:
morphology: a morphology object
root: the root node to traverse from
node_types: a list of node types (see neuron_morphology constants)
neuron_morphology.features.intrinsic.calculate_max_branch_order_from_root(morphology, root, node_types=None)[source]

Calculate the maximum number of branches from a root to a tip in a morphology. A branch is defined as being between two bifurcations or between a bifurcation and a tip Unlike mean_fragmentation and num_branches, if a node has multiple children it is counted as a single bifurcation point

Parameters:
morphology: a morphology object
root: the root node to traverse from
node_types: a list of node types (see neuron_morphology constants)
neuron_morphology.features.intrinsic.calculate_mean_fragmentation_from_root(morphology, root, node_types=None)[source]

Calculate the mean fragmentation from a root in a morphology. Mean fragmentation is the number of compartments over the number of branches. A branch is defined as being between two bifurcations or between a bifurcation and a tip if a node has three or more children, it is treated as succesive bifurcations, e.g a trifurcation: _/_/__ creates 4 branches since the branch between the two bifurcations counts

Parameters:
morphology: a morphology object
root: the root node to traverse from
node_types: a list of node types (see neuron_morphology constants)
neuron_morphology.features.intrinsic.child_ids_by_type(node_id, morphology, node_types=None)[source]

Helper function for the traversal functions