axon_synthesis.synthesis.add_tufts

Add tufts to Steiner solutions.

Functions

build_and_graft_tufts(morph, ...[, context, ...])

Build the tufts and graft them to the given morphology.

plot_tuft(morph, title, output_path[, ...])

Plot the given morphology.

Classes

SectionGrowerBoundary(parent, children, ...)

Section grower that will not cross the given boundary.

class axon_synthesis.synthesis.add_tufts.SectionGrowerBoundary(parent, children, first_point, direction, parameters, process, stop_criteria, step_size_distribution, pathlength, context=None, random_generator=<module 'numpy.random' from '/home/docs/checkouts/readthedocs.org/user_builds/axon-synthesis/conda/stable/lib/python3.12/site-packages/numpy/random/__init__.py'>)

Bases: SectionGrowerPath

Section grower that will not cross the given boundary.

next_point(current_point) tuple

Compute the next point and update it if close to the boundary.

axon_synthesis.synthesis.add_tufts.build_and_graft_tufts(morph: Morphology, tuft_properties: DataFrame, parameters: dict, distributions: dict, *, context=None, output_dir: str | PathLike | None = None, figure_dir: str | PathLike | None = None, initial_morph: Morphology | None = None, rng: None | int | Sequence[int] | SeedSequence | BitGenerator | Generator = None, logger: Logger | LoggerAdapter | None = None)

Build the tufts and graft them to the given morphology.

Warning

The directories passed to output_dir and figure_dir should already exist.

axon_synthesis.synthesis.add_tufts.plot_tuft(morph, title, output_path, initial_morph=None, morph_title=None, logger=None)

Plot the given morphology.

If initial_morph is not None then the given morphology is also plotted for comparison.