axon_synthesis.inputs.trunk_properties

Compute the long-range trunk properties after clustering.

Functions

angle_between_vectors(p1, p2)

Computes the angle in radians between vectors 'p1' and 'p2'.

compute_trunk_properties(trunk_morph, ...)

Compute the properties of the trunk morphologies listed in the given DataFrame.

section_segment_angles(section[, reference])

Angles between the segments of a section and a reference vector.

segment_angles(neurite[, reference])

Compute the angles between segments of the sections of a neurite.

vector(p1, p2)

Compute vector between two 3D points.

axon_synthesis.inputs.trunk_properties.angle_between_vectors(p1, p2)

Computes the angle in radians between vectors ‘p1’ and ‘p2’.

Normalizes the input vectors and computes the relative angle between them.

>>> angle_between((1, 0), (0, 1))
1.5707963267948966
>>> angle_between((1, 0), (1, 0))
0.0
>>> angle_between((1, 0), (-1, 0))
3.141592653589793
axon_synthesis.inputs.trunk_properties.compute_trunk_properties(trunk_morph: Morphology, morph_name: str, morph_path: str, axon_id: int, config_name: str, atlas_region_id: int | None) tuple

Compute the properties of the trunk morphologies listed in the given DataFrame.

axon_synthesis.inputs.trunk_properties.section_segment_angles(section, reference=None)

Angles between the segments of a section and a reference vector.

axon_synthesis.inputs.trunk_properties.segment_angles(neurite, reference=None)

Compute the angles between segments of the sections of a neurite.

axon_synthesis.inputs.trunk_properties.vector(p1: ndarray, p2: ndarray)

Compute vector between two 3D points.

Parameters:
  • p1 – the first point of the vector

  • p2 – the second point of the vector

Returns:

3-vector from p1 - p2