Topological Material Analysis 0.5
Analyse the structures of materials using tools from TDA
Loading...
Searching...
No Matches
plots Namespace Reference

Functions

 plot_APF (np.array APF, str name)
 Plot an accumulated persistence function.
 
 plot_APFs (list APFs, list APF_names, str fig_name)
 Plot a set accumulated persistence function, with automatic colour differentiation.
 
 plot_PD (dgm, str name)
 Plot a persistence diagram, with a specific colour.
 
 plot_PDs (dgms, str name)
 Plot several persistence diagrams, with automatic colour choices.
 
 plot_kernel_image_cokernel_PD (kicr, int d, bool codomain, bool kernel, bool image, bool cokernel, str name)
 Plot kernel, image, cokernel on same figure.
 
 generate_plots ()
 Generate plots for a single configuration.
 

Function Documentation

◆ generate_plots()

plots.generate_plots ( )

Generate plots for a single configuration.

Generate plots for a single configuration

This function generates persistence diagrams and APF plots for a single configuration. It creates empty lists to store the plots, then populates them based on enabled options.

The following plots can be generated:

  • Persistence diagrams in dimensions 0,1,2 if enabled via pd0, pd1, pd2 flags
  • Kernel/image/cokernel persistence diagrams if those computations are enabled
  • APF plots in dimensions 0,1,2 if enabled via apf0, apf1, apf2 flags
  • Kernel/image/cokernel APF plots if those computations are enabled

The plots are stored in st.session_state for later display.

Note
Requires that persistent homology has already been computed and stored in session state

◆ plot_APF()

plots.plot_APF ( np.array APF,
str name )

Plot an accumulated persistence function.

Parameters
APF- np.array with 2 columns of coordinates which define the APF
name- title for the plot
Returns
a plotly.express figure

◆ plot_APFs()

plots.plot_APFs ( list APFs,
list APF_names,
str fig_name )

Plot a set accumulated persistence function, with automatic colour differentiation.

Parameters
APFs- accumlated persistence functions to plot
Returns
a matplotlib figure

◆ plot_kernel_image_cokernel_PD()

plots.plot_kernel_image_cokernel_PD ( kicr,
int d,
bool codomain,
bool kernel,
bool image,
bool cokernel,
str name )

Plot kernel, image, cokernel on same figure.

Parameters
kicroineus::KerImCokReduced
dthe dimension to extract (either 1 or 2)
kernelbool to plot kernel
imagebool to plot image
cokernelbool to plot cokernel
Returns
figu figure with the chosen PD diagrams

◆ plot_PD()

plots.plot_PD ( dgm,
str name )

Plot a persistence diagram, with a specific colour.

Points at infinity are plotted at a height of 1.1 times the last finite point to die.

Parameters
dgm- pandas.DataFrame of the diagram
name- name to use as title of the plot
Returns
a plotly.express figure

◆ plot_PDs()

plots.plot_PDs ( dgms,
str name )

Plot several persistence diagrams, with automatic colour choices.

Points at infinity are plotted at a height of 1.1 times the last finite point to die.

Parameters
dgms- list of diagrams
name- title to use for the plot

@results a plotly.express figure