Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MorseFrames

CI Documentation Status PyPI License: MIT Python 3.10+

MorseFrames is an experimental C++ and Python library for working with Morse sequences, reference and coreference maps, Morse complexes, and Morse-based persistent homology.

Documentation is available at https://morseframes.readthedocs.io/en/latest/. New readers may want to start with the overview, quick start, and minimal examples. Please see CONTRIBUTING.md for development instructions and CITATION.cff for citation metadata.

The manuscript source for the Morse-frame persistence paper is kept outside this public software repository. When a public preprint or published version is available, the documentation will link to it.

The current codebase contains:

  • a header-only C++ core for filtered simplicial complexes;
  • several Morse sequence strategies, including saturated, F-Min, F-Max, same-level reduction, plateau-greedy, and flooding variants;
  • reference and coreference map construction;
  • Morse-reference and Morse-coreference persistence;
  • ordinary persistence for validation;
  • prime-field coefficients F_p in the Python interface;
  • a Python API with a pure-Python fallback and optional nanobind backend;
  • an experimental GUDHI-facing adapter for Simplex_tree;
  • tests, examples, and reproducible benchmark drivers.

Strategy terminology follows the paper: flooding strategies are filtration-monotone F-sequences, while f-max and f-min are global seed-and-expand F-sequence builders. All exposed strategies keep regular pairs inside one filtration level, so plateaus are handled without perturbing the filtration values.

The GUDHI adapter is included to make future upstream integration easier. It should be considered experimental, but the current native benchmark signal is encouraging: the optimized direct Simplex_tree path is near parity with GUDHI persistent cohomology on the tested flag complexes, and faster on the tested grid plateau complexes for the F-Min, F-Max, and same-level strategies. The generated tables in docs/native_gudhi_*_table.tex record the current numbers and the reproduction commands live in docs/benchmark_reproduction.md.

Build the C++ Tests

cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure

When the C++ GUDHI and Boost headers are available, CMake also builds optional GUDHI adapter tests, examples, and benchmarks. They can be supplied explicitly:

cmake -S . -B build \
  -DMORSEFRAMES_GUDHI_INCLUDE_DIR=/path/to/gudhi/include \
  -DMORSEFRAMES_BOOST_INCLUDE_DIR=/path/to/boost/include

To skip the optional GUDHI tools:

cmake -S . -B build -DMORSEFRAMES_BUILD_GUDHI_TOOLS=OFF

Python Quick Start

The current public alpha is available on PyPI:

python3 -m pip install "morseframes==0.1.0a2"
python3 -c "import morseframes as mf; print(mf.__version__, mf.cpp_backend_available())"

For development from a source checkout, install in editable mode with the test dependency as well. This uses scikit-build-core and nanobind to build the optional native backend:

python3 -m pip install -e ".[dev]"

Example:

import morseframes as mf

complex_ = mf.FilteredComplex.from_simplices([
    ([0], 0.0),
    ([1], 0.0),
    ([0, 1], 1.0),
])

sequence = mf.compute_morse_sequence(complex_, algorithm="f-max")
references = mf.compute_reference_map(complex_, sequence)
diagram = mf.compute_morse_persistence(complex_, sequence, references)

print(diagram.finite_barcode())
print(diagram.essential_barcode())

Prime-field coefficients are available by passing a prime modulus:

diagram = mf.compute_morse_persistence(complex_, algorithm="f-min", modulus=3)

Python Tests

MORSEFRAMES_DISABLE_CPP_BACKEND=1 python3 -m unittest discover -s python/tests -p "test_*.py"
python3 python/examples/quickstart.py

The pure-Python fallback can still be exercised directly from the source tree without building the native backend, or by disabling the backend explicitly:

PYTHONPATH=python python3 -c "import morseframes as mf; print(mf.cpp_backend_available())"
MORSEFRAMES_DISABLE_CPP_BACKEND=1 python3 -m unittest discover -s python/tests -p "test_*.py"

Documentation

Read the Docs is configured through .readthedocs.yaml. The public documentation is available at https://morseframes.readthedocs.io/.

The documentation can also be built locally:

python3 -m pip install -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
  • docs/python_api.md summarizes the public Python API.
  • docs/project_overview.rst explains the main objects and computation model.
  • docs/minimal_examples.rst gives small copy-paste examples.
  • docs/inspecting_morse_data.rst shows how to inspect sequences, maps, Morse complexes, and barcodes.
  • docs/strategies.md explains the Morse sequence strategies and terminology.
  • docs/python_prime_field_tutorial.md explains persistence over F_p.
  • docs/cpp_complex_view_api.md describes the C++ complex-view interface.
  • docs/gudhi_contribution_design_note.md summarizes the experimental GUDHI adapter.
  • docs/benchmark_reproduction.md explains how to regenerate benchmark tables.
  • Generated benchmark table fragments live in docs/*_table.tex; the scripts that regenerate them live in tools/.

Citation

If you use MorseFrames in academic work, please cite it using the metadata in CITATION.cff.

Contributing

Development and testing instructions are collected in CONTRIBUTING.md. Release notes are collected in CHANGELOG.md.

Development note

Parts of the implementation, tests, benchmarks, examples, and documentation were developed with assistance from OpenAI Codex. All mathematical choices, algorithmic design, validation, and released code were reviewed by the authors.

Status

This is research code. The public API is useful for experimentation, but names and interfaces may still change while the paper and GUDHI integration mature.

Release files for morseframes 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morseframes 0.1.0a2
File Size Uploaded
morseframes-0.1.0a2.tar.gz 1.6 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for morseframes 0.1.0a2
File
morseframes-0.1.0a2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
morseframes-0.1.0a2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
morseframes-0.1.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
morseframes-0.1.0a2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
morseframes-0.1.0a2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
morseframes-0.1.0a2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 3.0 MB

Release files / morseframes-0.1.0a2.tar.gz

Download URL morseframes-0.1.0a2.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
523cd07e289892f0fb8c1b125c966a35fa1ef73cb2cc2b73215bb05b74c6fc32
BLAKE2b-256 checksum
How to use checksums
14addb47b918bfb6b7caec8c06336116467e3712417329da1e755e8462360c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL morseframes-0.1.0a2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 240.7 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0057f17d1b2409929ca721ea44a5c24afc94730753635488ec18693083006276
BLAKE2b-256 checksum
How to use checksums
7ed34d134744b7acab48bd5323fab0e1e06bd4cfdefa42ea5adf87c2399519f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp312-cp312-macosx_11_0_arm64.whl

Download URL morseframes-0.1.0a2-cp312-cp312-macosx_11_0_arm64.whl
Size 229.1 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ed8a793236e5fc08370dde550cc8fd84fa724e326c578a9cc8a95b0904b575b1
BLAKE2b-256 checksum
How to use checksums
1cb2cc00e7239e0de66698581a3dedd24a0ba7d8cd5d4c71f5cf561ff26903e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL morseframes-0.1.0a2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 241.8 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
68b64ebe3f6c14484391495b4c59d9c8e060a7ef5d13479234fdbde1ff108bfa
BLAKE2b-256 checksum
How to use checksums
2e1b98d48491311c838103fbf6c3bef5cde0b92e50b5ff6c7352f64e9a3baa42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp311-cp311-macosx_11_0_arm64.whl

Download URL morseframes-0.1.0a2-cp311-cp311-macosx_11_0_arm64.whl
Size 230.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
53ee873f730a40330852adb46679d6c1d20f0c583ff3da869765f2e02005dd67
BLAKE2b-256 checksum
How to use checksums
51b7759341c1f8b4f409389da9753af3cea1b2bc4103819df686aaa4569b1aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL morseframes-0.1.0a2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 242.2 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9d46a403a02482c33d63342712b2247bca7f3286fceff98c145ac662263ec04b
BLAKE2b-256 checksum
How to use checksums
cda9668de027f2c4b85e6af7f02f1abc7ce90c1ae01164e2ed96c293115ed30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release files / morseframes-0.1.0a2-cp310-cp310-macosx_11_0_arm64.whl

Download URL morseframes-0.1.0a2-cp310-cp310-macosx_11_0_arm64.whl
Size 230.3 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f2d2155f520d9e435832b397cbbe703f1f3eec6d7d51d9da89bda0bc3e7eb30a
BLAKE2b-256 checksum
How to use checksums
1f80b7381d686bd9aa8bba2db53293fba9761f2c593cb33227e1012c56daf3b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

7 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page