neuron_morphology.features.path
¶
Module Contents¶
Functions¶
_calculate_max_path_distance (morphology, root, node_types) 

calculate_max_path_distance (morphology, root, node_types=None) 
Helper for max_path_distance. See below for more information. 
max_path_distance (data: MorphologyLike, node_types: Optional[List[int]] = None) → float 
Calculate the distance, following the path of adjacent neurites, from 
early_branch_path (data: MorphologyLike, node_types: Optional[List[int]] = None, soma: Optional[Dict] = None) → float 
Returns the ratio of the longest ‘short’ branch from a bifurcation to 
_calculate_mean_contraction (morphology, reference, root, node_types) 
Calculate the average contraction of all sections. In other words, 
calculate_mean_contraction (morphology, root=None, node_types=None) 
See mean_contraction 
mean_contraction (data: MorphologyLike, node_types: Optional[List[int]] = None) → float 
Calculate the average contraction of all sections. In other words, 

neuron_morphology.features.path.
_calculate_max_path_distance
(morphology, root, node_types)¶

neuron_morphology.features.path.
calculate_max_path_distance
(morphology, root, node_types=None)¶ Helper for max_path_distance. See below for more information.

neuron_morphology.features.path.
max_path_distance
(data: MorphologyLike, node_types: Optional[List[int]] = None) → float¶ Calculate the distance, following the path of adjacent neurites, from the soma to the furthest compartment. This is equivalent to the distance to the furthest SWC node.
Parameters:  data : the input reconstruction
 node_types : if provided, restrict the calculation to nodes of these
types
Returns:  The alongpath distance from the soma to the farthest (in the alongpath
 sense) node.

neuron_morphology.features.path.
early_branch_path
(data: MorphologyLike, node_types: Optional[List[int]] = None, soma: Optional[Dict] = None) → float¶ Returns the ratio of the longest ‘short’ branch from a bifurcation to the maximum path length of the tree. In other words, for each bifurcation, the maximum path length below that branch is calculated, and the shorter of these values is used. The maximum of these short values is divided by the maximum path length.
Parameters:  data : the input reconstruction
 node_types : if provided, restrict the calculation to nodes of these
types
 soma : if provided, use this node as the root, otherwise infer the root
from the argued morphology
Returns:  ratio of max short branch to max path length

neuron_morphology.features.path.
_calculate_mean_contraction
(morphology, reference, root, node_types)¶ Calculate the average contraction of all sections. In other words, calculate the average ratio of euclidean distance to path distance between all bifurcations in the morphology. Trifurcations are treated as bifurcations.
Parameters:  morphology: Morphology object
 reference: dict
 This is the node of the previous bifurcation
 root: dict
 This is the node from which to measure branch contraction under
 node_types: list (AXON, BASAL_DENDRITE, APICAL_DENDRITE)
 Type to restrict search to
Returns:  Two scalars: euclidean distance, path distance
 These are the total bifbif and biftip distances under this root

neuron_morphology.features.path.
calculate_mean_contraction
(morphology, root=None, node_types=None)¶ See mean_contraction

neuron_morphology.features.path.
mean_contraction
(data: MorphologyLike, node_types: Optional[List[int]] = None) → float¶ Calculate the average contraction of all sections. In other words, calculate the average ratio of euclidean distance to path distance between all bifurcations in the morphology. Trifurcations are treated as bifurcations.
Parameters:  data : the input reconstruction
 node_types : if provided, restrict the calculation to nodes of these
types
Returns:  The average contraction across all sections in this reconstruction