neurots.astrocyte.tmd_utils

Barcode utils.

Functions

barcodes_greater_than_distance(ph_list, ...)

Returns all barcodes the max value of which is greater than target_extent.

scale_barcode(ph, target_distance)

Scale a persistence homology from a given target distance.

neurots.astrocyte.tmd_utils.barcodes_greater_than_distance(ph_list, target_extent)

Returns all barcodes the max value of which is greater than target_extent.

Parameters:
  • ph_list (list[list[list]]) – A list of persistence homologies.

  • target_extent (float) – The target barcode extent.

Returns:

The list of the selected barcodes.

Return type:

list[list[list]]

neurots.astrocyte.tmd_utils.scale_barcode(ph, target_distance)

Scale a persistence homology from a given target distance.

Given a target distance, scale the persistence homology in order to make sure that the neurite will reach the target.

Parameters:
  • ph (list[list]) – The persistence homology.

  • target_distance (float) – The target distance.

Returns:

The rescaled persistence homology.

Return type:

list[list]