neurom.features.neurite

Neurite features.

Any public function from this namespace can be called via the features mechanism. If calling directly the function in this namespace can only accept a neurite as its input. If you want to apply it to anything other than neurite then you must use the features mechanism e.g. features.get.

>>> import neurom
>>> from neurom import features
>>> m = neurom.load_morphology("tests/data/swc/Neuron.swc")
>>> max_radial_distances1 = features.get('max_radial_distance', m.neurites)
>>> max_radial_distances2 = features.get('max_radial_distance', m.neurites[0])
>>> max_radial_distances3 = features.get('max_radial_distance', m)
>>> n_segments = features.get('number_of_segments', m, neurite_type=neurom.AXON)

For more details see Features.

Functions

bifurcation_partitions(neurite[, section_type])

Partition at bf points.

diameter_power_relations(neurite[, method, ...])

Calculate the diameter power relation at a bf point.

local_bifurcation_angles(neurite[, section_type])

Get a list of local bf angles.

max_radial_distance(neurite[, origin, ...])

Get the maximum radial distances of the termination sections.

number_of_bifurcations(neurite[, section_type])

Number of bf points.

number_of_forking_points(neurite[, section_type])

Number of forking points.

number_of_leaves(neurite[, section_type])

Number of leaves points.

number_of_sections(neurite[, iterator_type, ...])

Number of sections.

number_of_segments(neurite[, section_type])

Number of segments.

partition_asymmetry(neurite[, variant, ...])

Partition asymmetry at bf points.

partition_asymmetry_length(neurite[, ...])

'partition_asymmetry' feature with variant='length'.

partition_pairs(neurite[, section_type])

Partition pairs at bf points.

principal_direction_extents(neurite[, ...])

Principal direction extent of neurites in morphologies.

remote_bifurcation_angles(neurite[, ...])

Get a list of remote bf angles.

section_areas(neurite[, section_type])

Section areas.

section_bif_branch_orders(neurite[, ...])

Bifurcation section branch orders.

section_bif_lengths(neurite[, section_type])

Bifurcation section lengths.

section_bif_radial_distances(neurite[, ...])

Get the radial distances of the bf sections.

section_branch_orders(neurite[, section_type])

Section branch orders.

section_end_distances(neurite[, section_type])

Section end to end distances.

section_lengths(neurite[, section_type])

Section lengths.

section_path_distances(neurite[, ...])

Path lengths.

section_radial_distances(neurite[, origin, ...])

Section radial distances.

section_strahler_orders(neurite[, section_type])

Inter-segment opening angles in a section.

section_taper_rates(neurite[, section_type])

Diameter taper rates of the sections from root to tip.

section_term_branch_orders(neurite[, ...])

Termination section branch orders.

section_term_lengths(neurite[, section_type])

Termination section lengths.

section_term_radial_distances(neurite[, ...])

Get the radial distances of the termination sections.

section_tortuosity(neurite[, section_type])

Section tortuosities.

section_volumes(neurite[, section_type])

Section volumes.

segment_areas(neurite[, section_type])

Areas of the segments.

segment_lengths(neurite[, section_type])

Lengths of the segments.

segment_meander_angles(neurite[, section_type])

Inter-segment opening angles in a section.

segment_midpoints(neurite[, section_type])

Return a list of segment mid-points.

segment_path_lengths(neurite[, section_type])

Returns pathlengths between all non-root points and their root point.

segment_radial_distances(neurite[, origin, ...])

Returns the list of distances between all segment mid points and origin.

segment_radii(neurite[, section_type])

Arithmetic mean of the radii of the points in segments.

segment_taper_rates(neurite[, section_type])

Diameters taper rates of the segments.

segment_volumes(neurite[, section_type])

Volumes of the segments.

sibling_ratios(neurite[, method, section_type])

Sibling ratios at bf points.

terminal_path_lengths(neurite[, section_type])

Get the path lengths to each terminal point.

total_area(neurite[, section_type])

Neurite surface area.

total_length(neurite[, section_type])

Neurite length.

total_volume(neurite[, section_type])

Neurite volume.

volume_density(neurite[, section_type])

Get the volume density.

neurom.features.neurite.bifurcation_partitions(neurite, section_type=NeuriteType.all)

Partition at bf points.

neurom.features.neurite.diameter_power_relations(neurite, method='first', section_type=NeuriteType.all)

Calculate the diameter power relation at a bf point.

Diameter power relation is defined in https://www.ncbi.nlm.nih.gov/pubmed/18568015

This quantity gives an indication of how far the branching is from the Rall ratio (when =1).

neurom.features.neurite.local_bifurcation_angles(neurite, section_type=NeuriteType.all)

Get a list of local bf angles.

neurom.features.neurite.max_radial_distance(neurite, origin=None, section_type=NeuriteType.all)

Get the maximum radial distances of the termination sections.

neurom.features.neurite.number_of_bifurcations(neurite, section_type=NeuriteType.all)

Number of bf points.

neurom.features.neurite.number_of_forking_points(neurite, section_type=NeuriteType.all)

Number of forking points.

neurom.features.neurite.number_of_leaves(neurite, section_type=NeuriteType.all)

Number of leaves points.

neurom.features.neurite.number_of_sections(neurite, iterator_type=<function Section.ipreorder>, section_type=NeuriteType.all)

Number of sections. For a morphology it will be a sum of all neurites sections numbers.

neurom.features.neurite.number_of_segments(neurite, section_type=NeuriteType.all)

Number of segments.

neurom.features.neurite.partition_asymmetry(neurite, variant='branch-order', method='petilla', section_type=NeuriteType.all)

Partition asymmetry at bf points.

Variant: length is a different definition, as the absolute difference in downstream path lenghts, relative to the total neurite path length Method: ‘petilla’ or ‘uylings’. The former is default. The latter uses -2 shift.

neurom.features.neurite.partition_asymmetry_length(neurite, method='petilla', section_type=NeuriteType.all)

‘partition_asymmetry’ feature with variant=’length’.

Because it is often used, it has a dedicated feature.

neurom.features.neurite.partition_pairs(neurite, section_type=NeuriteType.all)

Partition pairs at bf points.

Partition pair is defined as the number of bifurcations at the two daughters of the bifurcating section

neurom.features.neurite.principal_direction_extents(neurite, direction=0, section_type=NeuriteType.all)

Principal direction extent of neurites in morphologies.

Note

Principal direction extents are always sorted in descending order. Therefore, by default the maximal principal direction extent is returned.

neurom.features.neurite.remote_bifurcation_angles(neurite, section_type=NeuriteType.all)

Get a list of remote bf angles.

neurom.features.neurite.section_areas(neurite, section_type=NeuriteType.all)

Section areas.

neurom.features.neurite.section_bif_branch_orders(neurite, section_type=NeuriteType.all)

Bifurcation section branch orders.

neurom.features.neurite.section_bif_lengths(neurite, section_type=NeuriteType.all)

Bifurcation section lengths.

neurom.features.neurite.section_bif_radial_distances(neurite, origin=None, section_type=NeuriteType.all)

Get the radial distances of the bf sections.

neurom.features.neurite.section_branch_orders(neurite, section_type=NeuriteType.all)

Section branch orders.

neurom.features.neurite.section_end_distances(neurite, section_type=NeuriteType.all)

Section end to end distances.

neurom.features.neurite.section_lengths(neurite, section_type=NeuriteType.all)

Section lengths.

neurom.features.neurite.section_path_distances(neurite, iterator_type=<function Section.ipreorder>, section_type=NeuriteType.all)

Path lengths.

neurom.features.neurite.section_radial_distances(neurite, origin=None, section_type=NeuriteType.all)

Section radial distances.

The iterator_type can be used to select only terminal sections (ileaf) or only bifurcations (ibifurcation_point).

neurom.features.neurite.section_strahler_orders(neurite, section_type=NeuriteType.all)

Inter-segment opening angles in a section.

neurom.features.neurite.section_taper_rates(neurite, section_type=NeuriteType.all)

Diameter taper rates of the sections from root to tip.

Taper rate is defined here as the linear fit along a section. It is expected to be negative for morphologies.

neurom.features.neurite.section_term_branch_orders(neurite, section_type=NeuriteType.all)

Termination section branch orders.

neurom.features.neurite.section_term_lengths(neurite, section_type=NeuriteType.all)

Termination section lengths.

neurom.features.neurite.section_term_radial_distances(neurite, origin=None, section_type=NeuriteType.all)

Get the radial distances of the termination sections.

neurom.features.neurite.section_tortuosity(neurite, section_type=NeuriteType.all)

Section tortuosities.

neurom.features.neurite.section_volumes(neurite, section_type=NeuriteType.all)

Section volumes.

neurom.features.neurite.segment_areas(neurite, section_type=NeuriteType.all)

Areas of the segments.

neurom.features.neurite.segment_lengths(neurite, section_type=NeuriteType.all)

Lengths of the segments.

neurom.features.neurite.segment_meander_angles(neurite, section_type=NeuriteType.all)

Inter-segment opening angles in a section.

neurom.features.neurite.segment_midpoints(neurite, section_type=NeuriteType.all)

Return a list of segment mid-points.

neurom.features.neurite.segment_path_lengths(neurite, section_type=NeuriteType.all)

Returns pathlengths between all non-root points and their root point.

neurom.features.neurite.segment_radial_distances(neurite, origin=None, section_type=NeuriteType.all)

Returns the list of distances between all segment mid points and origin.

neurom.features.neurite.segment_radii(neurite, section_type=NeuriteType.all)

Arithmetic mean of the radii of the points in segments.

neurom.features.neurite.segment_taper_rates(neurite, section_type=NeuriteType.all)

Diameters taper rates of the segments.

The taper rate is defined as the absolute radii differences divided by length of the section

neurom.features.neurite.segment_volumes(neurite, section_type=NeuriteType.all)

Volumes of the segments.

neurom.features.neurite.sibling_ratios(neurite, method='first', section_type=NeuriteType.all)

Sibling ratios at bf points.

The sibling ratio is the ratio between the diameters of the smallest and the largest child. It is a real number between 0 and 1. Method argument allows one to consider mean diameters along the child section instead of diameter of the first point.

neurom.features.neurite.terminal_path_lengths(neurite, section_type=NeuriteType.all)

Get the path lengths to each terminal point.

neurom.features.neurite.total_area(neurite, section_type=NeuriteType.all)

Neurite surface area. For a morphology it will be a sum of all neurite areas.

The area is defined as the sum of the area of the sections.

neurom.features.neurite.total_length(neurite, section_type=NeuriteType.all)

Neurite length. For a morphology it will be a sum of all neurite lengths.

neurom.features.neurite.total_volume(neurite, section_type=NeuriteType.all)

Neurite volume. For a morphology it will be a sum of neurites volumes.

neurom.features.neurite.volume_density(neurite, section_type=NeuriteType.all)

Get the volume density.

The volume density is defined as the ratio of the neurite volume and the volume of the neurite’s enclosing convex hull

TODO: convex hull fails on some morphologies, it may be good to instead use

bounding_box to compute the neurite enclosing volume

Note

Returns np.nan if the convex hull computation fails.