neurots.astrocyte.space_colonization

Basic class for TreeGrower Algorithms for space colonization.

Classes

SpaceColonization(input_data, params, ...[, ...])

Algorithm for growing a tree using a variation of the space colonization algorithm.

SpaceColonizationTarget(input_data, params, ...)

A target is specified for this algorithm.

class neurots.astrocyte.space_colonization.SpaceColonization(input_data, params, start_point, context=None, random_generator=numpy.random, **_)

Bases: neurots.generate.algorithms.tmdgrower.TMDAlgo

Algorithm for growing a tree using a variation of the space colonization algorithm.

A spatial colonization context is required, which will provide access to the seed point cloud for the respective queries needed for the splitting strategies.

The neurots space colonization algorithm operates using the following data:

  • SpaceColonizationContext
    • Seeds point cloud

    • Space colonization parameters (kill and influence distance)

bifurcate(current_section)

When the section bifurcates two new sections need to be created.

This method computes from the current state the data required for the generation of two new sections and returns the corresponding dictionaries.

select_persistence(input_data, random_generator=numpy.random)

Select the persistence.

The persistaece is randomly selected from the barcodes the max radial of which is greater or equal to the distance from the soma to the domain face.

Parameters
  • input_data (dict) – The input data parameters.

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

Returns

The topology barcode.

Return type

Barcode

class neurots.astrocyte.space_colonization.SpaceColonizationTarget(input_data, params, start_point, context=None, random_generator=numpy.random, **_)

Bases: neurots.astrocyte.space_colonization.SpaceColonization

A target is specified for this algorithm.

The tree grows biased from the target and when it reaches it, it stops being influenced by the point.

bifurcate(current_section)

When the section bifurcates two new sections need to be created.

This method computes from the current state the data required for the generation of two new sections and returns the corresponding dictionaries.

get_stop_criteria(current_section)

Get stop criteria.

Use the stop criteria of the parent class with the additional information of the target_id that is assigned to the tree and the max_target_distance for calculating the magnitude of the attraction field generated by the target.

initialize()

TMD basic grower of an apical tree based on path distance.

Initializes the tree grower and computes the apical distance using the input barcode.

select_persistence(input_data, random_generator=numpy.random)

Select the persistence.

The persistaece is randomly selected from the barcodes the max radial of which is greater or equal to the distance from the soma to the target.

Parameters
  • input_data (dict) – The input data parameters.

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

Returns

The topology barcode.

Return type

Barcode