neurots.generate.section

NeuroTS class: Section grower.

Classes

SectionGrower(parent, children, first_point, ...)

Class for the section growth.

SectionGrowerExponentialProba(parent, ...[, ...])

Abstract class for exponentially decreasing bifurcation and termination probabilities.

SectionGrowerPath(parent, children, ...[, ...])

Class for the TMD path based section growth.

SectionGrowerTMD(parent, children, ...[, ...])

Class for the TMD section growth.

class neurots.generate.section.SectionGrower(parent, children, first_point, direction, parameters, process, stop_criteria, step_size_distribution, pathlength, context=None, random_generator=numpy.random)

Bases: object

Class for the section growth.

A section is a list of points in 4D space (x, y, x, r) that are sequentially connected to each other. This process generates a tubular morphology that resembles a random walk.

Parameters:
  • parent (morphio.Section) – The parent of the section.

  • children (int) – The number of children.

  • first_point (list[float]) – The first point of the section.

  • direction (list[float]) – The first point of the section.

  • parameters (SectionParameters) – The parameters used to grow the section.

  • process (str) – The process type.

  • stop_criteria (dict) – The stop criteria used for this section.

  • step_size_distribution (Distr) – The step size distribution.

  • pathlength (float) – The path length of the section.

  • context (Any) – The context used for the section.

  • random_generator (numpy.random.Generator) – The random number generator to use.

check_stop()

Checks if any num_seg criteria is fulfilled.

If it is, it returns False and the growth stops.

first_point()

Generates the first point of the section from the growth method and the previous point.

This gives flexibility to implement a specific computation for the first point, and ensures the section has at least one point.

Warning

The growth process cannot terminate before this point, as a first point will always be added to an active section.

history()

Returns a combination of the sections history.

property last_point

Returns the last point of the section.

next()

Creates one point and returns the next state: bifurcate, terminate or continue.

next_point(current_point)

Returns the next point depending on the growth method and the previous point.

post_next_point()

A method to perform actions after self.next_point() has been called.

update_pathlength(length)

Increases the path distance.

class neurots.generate.section.SectionGrowerExponentialProba(parent, children, first_point, direction, parameters, process, stop_criteria, step_size_distribution, pathlength, context=None, random_generator=numpy.random)

Bases: SectionGrower

Abstract class for exponentially decreasing bifurcation and termination probabilities.

The parameter lambda defines the slope of the exponential. The parameter that follows the exponential must be defined in the derived class.

check_stop()

Probabilities of bifurcating and stopping are proportional exp(-distance * lambda).

get_val()

Placeholder for any function.

class neurots.generate.section.SectionGrowerPath(parent, children, first_point, direction, parameters, process, stop_criteria, step_size_distribution, pathlength, context=None, random_generator=numpy.random)

Bases: SectionGrowerExponentialProba

Class for the TMD path based section growth.

get_val()

Returns path distance.

class neurots.generate.section.SectionGrowerTMD(parent, children, first_point, direction, parameters, process, stop_criteria, step_size_distribution, pathlength, context=None, random_generator=numpy.random)

Bases: SectionGrowerExponentialProba

Class for the TMD section growth.

get_val()

Returns radial distance.