Morphology Factories

dendrotweaks.morphology.io.factories.create_point_tree(source: str | DataFrame) PointTree[source]

Create a point tree from either a file path or a DataFrame.

Parameters:

source (Union[str, DataFrame]) – The source of the SWC data. Can be a file path or a DataFrame.

Returns:

The point tree representing the reconstruction of the neuron morphology.

Return type:

PointTree

dendrotweaks.morphology.io.factories.create_section_tree(point_tree: PointTree)[source]

Create a section tree from a point tree.

Parameters:

point_tree (PointTree) – The point tree to create the section tree from by splitting it into sections.

Returns:

The section tree created representing the neuron morphology on a more abstract level.

Return type:

SectionTree

dendrotweaks.morphology.io.factories.create_segment_tree(sec_tree)[source]

Create a segment tree from a section tree.

Parameters:

sec_tree (SectionTree) – The section tree to create the segment tree from by splitting it into segments.

Returns:

The segment tree representing spatial discretization of the neuron morphology for numerical simulations.

Return type:

SegmentTree