persforest computes codimension-one persistent homology (H1 of 2D data, H2 of 3D data) together with a cycle representative for every bar at every filtration value in its lifespan. The resulting cycle progression barcode shows how each bar’s representative cycle shrinks from birth to death; all representatives are stored compactly in a persistence forest.
Features:
- Alpha and Delaunay–Čech filtrations of point clouds, and cubical filtrations of images and volumes
- Measurement landscapes: vectorisations built from measurements of the representatives (e.g. length, enclosed area, circularity) along each bar
- Plots and animations of barcodes, filtrations and representatives
Performance for the full forest (barcode and all representatives) on an Apple M4 Pro (details):
- 1 million points (alpha filtration): 1.6–1.7 s in 2D, 4.4–4.8 s in 3D
- 10 million points (alpha filtration): 23.7–24.4 s in 2D, 62.1–64.0 s in 3D
- 2048 × 2048 image: 0.8–1.9 s
- 256³ volume: 5.7–8.9 s
The package is based on the paper Cycle Progression Barcodes and Measurement Landscapes for Codimension 1 Persistent Homology and can be installed with
pip install persforest