Diagram readers reference manual#

gudhi.read_persistence_intervals_grouped_by_dimension(persistence_file='')#

Reads a file containing persistence intervals. Each line might contain 2, 3 or 4 values: [[field] dimension] birth death The return value is a dict(dim, list(tuple(birth, death))) where dim is an int, birth a float, and death a float. Note: the function does not check that birth <= death.

Parameters:

persistence_file (string) – A persistence file style name.

Returns:

The persistence pairs grouped by dimension.

Return type:

Dict[int, List[Tuple[float, float]]]

gudhi.read_persistence_intervals_in_dimension(persistence_file='', only_this_dim=-1)#

Reads a file containing persistence intervals. Each line of persistence_file might contain 2, 3 or 4 values: [[field] dimension] birth death Note: the function does not check that birth <= death.

Parameters:
  • persistence_file (string) – A persistence file style name.

  • only_this_dim (int.) – The specific dimension. Default value is -1. If only_this_dim = -1, dimension is ignored and all lines are returned. If only_this_dim is >= 0, only the lines where dimension = only_this_dim (or where dimension is not specified) are returned.

Returns:

The persistence intervals.

Return type:

numpy array of dimension 2