neuron_morphology.features.statistics.overlap
¶
Module Contents¶
Functions¶
calculate_coordinate_overlap_from_min_max (coordinates: np.ndarray, minv: float, maxv: float, dimension: int = 1) |
Return the % of coordinates that are above the max, |
calculate_coordinate_overlap (coordinates_a, coordinates_b, dimension: int = 1) |
Return the % of coordinates_a that are above, overlaping, and below |
overlap (data: Data, node_types: Optional[List[int]] = None, node_types_to_compare: Optional[List[int]] = None, coord_type: COORD_TYPE = COORD_TYPE.NODE, dimension: int = 1) |
Compares the locations of node_types to node_types_to_compare |
-
neuron_morphology.features.statistics.overlap.
calculate_coordinate_overlap_from_min_max
(coordinates: np.ndarray, minv: float, maxv: float, dimension: int = 1)¶ Return the % of coordinates that are above the max, between, or below the min
Parameters: - coordinates: np.ndarray with x, y, z columns
- minv: min to check against
- maxv: max to check against
- dimension: dimension to compare (0, 1, 2 for x, y, z), default 1 (y)
-
neuron_morphology.features.statistics.overlap.
calculate_coordinate_overlap
(coordinates_a, coordinates_b, dimension: int = 1)¶ Return the % of coordinates_a that are above, overlaping, and below coordinates_b, and the same for b over a
Parameters: - coordinates_a: 2d array-like with x, y, z cols
- coordinates_b: 2d array-like with x, y, z cols
- dimension: dimension to compare (0, 1, 2 for x, y, z), default 1 (y)
Returns: - dict: a_above_b, a_overlap_b, a_below_b, or
-1’s if coordinates_b is empty
-
neuron_morphology.features.statistics.overlap.
overlap
(data: Data, node_types: Optional[List[int]] = None, node_types_to_compare: Optional[List[int]] = None, coord_type: COORD_TYPE = COORD_TYPE.NODE, dimension: int = 1)¶ Compares the locations of node_types to node_types_to_compare Calculate % of coordinates of node_types that are above, overlapping, and below the coordinates of node_types_to_compare
- Example: calculate_overlap(
- morphology, node_types=[AXON], node_types_to_compare=[APICAL_DENDRITE, BASAL_DENDRITE])
will return the percentage of AXON nodes that are above, overlapping, and below DENDRITE nodes
Parameters: - data: Data Object containing a morphology
- node_types: a list of node types (see neuron_morphology constants)
- node_types_to_compare: a list of node types (see neuron_morphology constants)
- coord_type: Restrict analysis to specific coordinate type
(see neuron_morphology.features.statistics.coordinates for options)
- dimension: dimension to compare (0, 1, 2 for x, y, z), default 1 (y)