neuror.unravel¶
The unravel module
Unravelling is the action of “stretching” the cell that has been shrunk because of the dehydratation caused by the slicing
Functions
|
Return the principal direction of a point cloud. |
|
Unravel a section using number of adjacent points as window_half_length. |
Return an unravelled neuron. |
|
Repair all morphologies in input folder. |
|
Return a new |
- neuror.unravel.unravel(filename, window_half_length=None, legacy_behavior=False, use_path_length=True)[source]¶
Return an unravelled neuron.
Segment are unravelled iteratively Each segment direction is replaced by the averaged direction in a sliding window around this segment, preserving the original segment length. The start position of the new segment is the end of the latest unravelled segment
Note
Based initially on: DOI: 10.7551/mitpress/9780262013277.001.0001
Section: 9.2 Repair of Neuronal Dendrites
- Parameters:
filename (str) – the neuron to unravel
window_half_length (int) – path length that defines half of the sliding window
legacy_behavior (bool) – if yes, when the soma has more than one point, the first point of the soma is appended to the start of each neurite.
use_path_length (bool) – if False, the argument window_half_length will be recasted to an int and correspond to number of points on each side of the window.
- Returns:
a tuple where first item is the unravelled morphology and the second one is the mapping of each point coordinate before and after unravelling
- Return type:
- neuror.unravel.unravel_all(raw_dir, unravelled_dir, raw_planes_dir, unravelled_planes_dir, window_half_length=None)[source]¶
Repair all morphologies in input folder.
- neuror.unravel.unravel_plane(plane, mapping)[source]¶
Return a new
CutPlane
object where the cut-leaves position has been updated after unravelling.- Parameters:
plane (CutPlane) – the plane
mapping (pandas.DataFrame) – the mapping