Skip to main content

NAME
#

dump_diagram - Display all birth-death pairs of a persistence diagram

SYNOPSIS
#

homcloud-dump-diagram
    [-h] [-V] -d DEGREE [-T TYPE] [-N] [-o OUTPUT]
    [-S SHOW_SIMPLICES] [-E SHOW_ESSENTIAL_PAIRS] [-s SYMBOLS]
    input

This program can also be invoked as python3 -m homcloud.cli.dump_diagram.

ALIAS
#

homcloud-dump-diagram

DESCRIPTION
#

This program displays all birth-death pairs on your console.

If -o option is given, the result is saved into the file instead of showing pairs on the console.

If -S yes is given, the geometric information (positions/vertices) of the birth and death cells is also displayed; this requires the input pdgm file to contain that information (see the -M option of homcloud-pc-alpha, homcloud-rips, homcloud-pict-binarize-nd, etc.).

OPTIONS
#

-h, --help            show this help message and exit
-V, --version         show program's version number and exit
-d DEGREE, --degree DEGREE
                      degree of PH
-T TYPE, --type TYPE  input file format (pdgm, text) (default:
                      autodetect)
-N, --negate          flip the sign of birth/death times for superlevel
                      persistence (default: False)
-o OUTPUT, --output OUTPUT
                      output text file
-S SHOW_SIMPLICES, --show-simplices SHOW_SIMPLICES
                      show birth/death simplices (yes/no, default:no)
-E SHOW_ESSENTIAL_PAIRS, --show-essential-pairs SHOW_ESSENTIAL_PAIRS
                      show essential pairs (yes/no, default:no)
-s SYMBOLS, --symbols SYMBOLS
                      show birth/death simplices by symbols(yes/no
                      default:no)

input is a .pdgm file (or a text file of birth-death pairs when -T text is used).

OUTPUT FORMAT
#

When -E yes is given, all essential pairs (pairs with infinite death time) are appended after the finite pairs. If no is given (the default), essential pairs are not shown.

CASE WITH -S no (default)
#

Birth times are shown on the 1st column, and death times are shown on the 2nd column. The columns are separated by a space.

Example:

b1 d1
b2 d2
  :

CASE WITH -S yes
#

Birth times are shown on the 1st column, death times are shown on the 2nd column, the geometry of the birth cell is shown on the 3rd column, and the geometry of the death cell is shown on the 4th column. The columns are separated by a space. The shape of the geometry depends on the filtration type of the input pdgm file:

  • For a cubical/bitmap filtration (homcloud-pict-binarize-nd, homcloud-pict-pixel-levelset-nd, …), each cell is shown as the pixel coordinates of its vertices.
  • For an alpha or Vietoris-Rips filtration, each cell is shown as the point coordinates of its vertices.
  • For a simplicial/abstract filtration, each cell is shown as the list of its vertices (indices, or symbols when -s yes is given).

Example (cubical filtration):

b1 d1 (x_b1,y_b1) (x_d1,y_d2)
b2 d2 (x_b2,y_b2) (x_d2,y_d2)
    :

Example (alpha filtration):

b1 d1 {(x_b11,y_b11,z_b11),(x_b12,y_b12,z_b12)} {(x_d11,y_d11,z_d11),(x_d12,y_d12,z_d12),(x_d13,y_d13,z_d13)}
b2 d2 {(x_b21,y_b21,z_b21),(x_b22,y_b22,z_b22)} {(x_d21,y_d21,z_d21),(x_d22,y_d22,z_d22),(x_d23,y_d23,z_d23)}
    :

If -s yes is also given, vertices are shown by their symbols (from --vertex-symbols, used when the diagram was created) instead of coordinates or indices.