neurots.generate.grower

NeuroTS class: Grower object that contains the grower functionality.

Classes

NeuronGrower(input_parameters, ...[, ...])

The main class for growing algorithms of neurons.

class neurots.generate.grower.NeuronGrower(input_parameters, input_distributions, context=None, external_diametrizer=None, skip_validation=False, rng_or_seed=numpy.random)

Bases: object

The main class for growing algorithms of neurons.

A Grower object is a container for a Neuron, encoded in the (groups, points) structure, as a morphIO Morphology object. A set of input distributions that store the data consumed by the algorithms and the user-selected parameters are also stored.

Parameters
  • input_parameters (dict) – The user-defined parameters.

  • input_distributions (dict) – Distributions extracted from biological data.

  • context (Any) – An object containing contextual information.

  • external_diametrizer (Callable) – Diametrizer function for external diametrizer module

  • skip_validation (bool) – If set to False, the parameters and distributions are validated.

  • rng_or_seed (int or numpy.random.Generator) – A random number generator to use. If an int is given, it is passed to numpy.random.default_rng() to create a new random number generator.

  • trunk_orientations_class (Generic[OrientationManagerBase]) – The class used to build the trunk orientation manager. This class should inherit from neurots.generate.orientations.OrientationManagerBase.

grow()

Generates a neuron according to the input_parameters and the input_distributions.

The neuron consists of a soma and a list of trees encoded in the h5 format as a set of points and groups.

Returns

The grown neuron.

Return type

morphio.mut.Morphology

next()

Call the “next” method of each neurite grower.

validate_distribs()

Validate the distribution dictionary.

validate_params()

Validate the parameter dictionary.