:mod:`neuron_morphology.features.size` ====================================== .. py:module:: neuron_morphology.features.size Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: neuron_morphology.features.size.total_length neuron_morphology.features.size.total_surface_area neuron_morphology.features.size.total_volume neuron_morphology.features.size.mean_diameter neuron_morphology.features.size.parent_daughter_ratio_visitor neuron_morphology.features.size.mean_parent_daughter_ratio neuron_morphology.features.size.max_euclidean_distance .. function:: total_length(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculate the total length across all compartments in a reconstruction :Parameters: **data** : the input reconstruction .. **node_types** : if provided, restrict the calculation to compartments involving these types :Returns: The sum of segment lengths across all segments in the reconstruction .. .. rubric:: Notes Excludes compartments where the parent is: 1. the soma 2. a root of the reconstruction The logic here is that the soma root is likely to substantially overlap any of its compartments, while non-root soma nodes will be closer to the soma surface. .. !! processed by numpydoc !! .. function:: total_surface_area(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculates the sum of lateral surface areas across all comparments (linked pairs of nodes) in a reconstruction. This approximates the total surface area of the reconstruction. See Morphology.get_compartment_surface_area for details. :Parameters: **data** : The reconstruction whose surface area will be computed .. **node_types** : restrict the calculation to compartments involving these node types :Returns: The sum of compartment lateral surface areas across this reconstruction .. .. !! processed by numpydoc !! .. function:: total_volume(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculates the sum of volumes across all comparments (linked pairs of nodes) in a reconstruction. This approximates the total volume of the reconstruction. See Morphology.get_compartment_volume for details. :Parameters: **data** : The reconstruction whose volume will be computed .. **node_types** : restrict the calculation to compartments involving these node types :Returns: The sum of compartment volumes across this reconstruction .. .. !! processed by numpydoc !! .. function:: mean_diameter(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculates the mean diameter of all nodes :Parameters: **morphology** : The reconstruction whose mean diameter .. **node_types** : restrict the calculation to compartments involving these node types :Returns: The average diameter across selected nodes .. .. !! processed by numpydoc !! .. function:: parent_daughter_ratio_visitor(node: Dict[str, Any], morphology: Morphology, counters: Dict[str, Union[int, float]], node_types: Optional[List[int]] = None) Calculates for a single node the ratio of the node's parent's radius to the node's radius. Stores these values in a provided dictionary. :Parameters: **node** : The node under consideration .. **morphology** : The reconstruction to which this node belongs .. **counters** : a dictionary used for storing running ratio totals and counts. .. **node_types** : skip nodes not of one of these types .. .. rubric:: Notes see mean_parent_daughter_ratio for usage .. !! processed by numpydoc !! .. function:: mean_parent_daughter_ratio(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculate the average ratio of parent radii to child radii across a reconstruction. :Parameters: **data** : The reconstruction whose mean parent daugther ratio will be computed .. **node_types** : restrict the calculation to compartments involving these node types .. rubric:: Notes Note that this function differs from the L-measure parent daughter ratio, which calculates the ratio of the child node size to the parent. Note also that both the parent and child must be in node_types in order for a compartment to be included in the calculation .. !! processed by numpydoc !! .. function:: max_euclidean_distance(data: MorphologyLike, node_types: Optional[List[int]] = None) -> float Calculate the furthest distance, in 3-space, of a compartment's end from the soma. This is equivalent to the distance to the furthest SWC node. :Parameters: **data: The reconstruction whose max euclidean distance will be** calculated **node_types: restrict consideration to these types** .. :Returns: The distance between the soma and the farthest-from-soma node in this .. morphology. .. .. !! processed by numpydoc !!