:mod:`neuron_morphology.features.intrinsic` =========================================== .. py:module:: neuron_morphology.features.intrinsic Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: neuron_morphology.features.intrinsic.num_tips neuron_morphology.features.intrinsic.num_nodes neuron_morphology.features.intrinsic.child_ids_by_type neuron_morphology.features.intrinsic.calculate_branches_from_root neuron_morphology.features.intrinsic.num_branches neuron_morphology.features.intrinsic.calculate_mean_fragmentation_from_root neuron_morphology.features.intrinsic.mean_fragmentation neuron_morphology.features.intrinsic.calculate_max_branch_order_from_root neuron_morphology.features.intrinsic.max_branch_order .. function:: num_tips(data: Data, node_types: Optional[List] = None) Calculate number of tips :Parameters: **data: Data Object containing a morphology** .. **node_types: a list of node types (see neuron_morphology constants)** .. .. !! processed by numpydoc !! .. function:: num_nodes(data: Data, node_types: Optional[List] = None) Calculate number of nodes of a given type :Parameters: **data: Data Object containing a morphology** .. **node_types: a list of node types (see neuron_morphology constants)** .. .. !! processed by numpydoc !! .. function:: child_ids_by_type(node_id, morphology, node_types=None) Helper function for the traversal functions .. !! processed by numpydoc !! .. function:: calculate_branches_from_root(morphology, root, node_types=None) 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)** .. .. !! processed by numpydoc !! .. function:: num_branches(data: Data, node_types: Optional[List] = None) Calculate number of branches :Parameters: **data: Data Object containing a morphology** .. **node_types: a list of node types (see neuron_morphology constants)** .. .. !! processed by numpydoc !! .. function:: calculate_mean_fragmentation_from_root(morphology, root, node_types=None) 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)** .. .. !! processed by numpydoc !! .. function:: mean_fragmentation(data: Data, node_types: Optional[List] = None) Calculate the mean number of compartments per branch :Parameters: **data: Data Object containing a morphology** .. **node_types: a list of node types (see neuron_morphology constants)** .. .. !! processed by numpydoc !! .. function:: calculate_max_branch_order_from_root(morphology, root, node_types=None) Calculate the greatest number of branches encountered among all directed paths from the morphology's root to its leaves. A branch is defined as a root->leaf ordered path for which: 1. the first node on the path is either a. a bifurcation (has > 1 children) b. the root node 2. the last node on the path is either a. a bifurcation b. a leaf node (has 0 children) :Parameters: **morphology: the reconstruction whose max branch order will be** calculated **root: treat this node as root** .. **node_types: If not None, consider only root->leaf paths whose leaf** nodes are among these types (see neuron_morphology constants) :Returns: The greatest branch count encountered among all considered root->leaf .. paths .. .. !! processed by numpydoc !! .. function:: max_branch_order(data: Data, node_types: Optional[List] = None) Calculate mean fragmentation :Parameters: **data: Data Object containing a morphology** .. **node_types: a list of node types (see neuron_morphology constants)** .. .. !! processed by numpydoc !!