Skip to main content

ntsa — nonlinear time-series analysis for dynamical-system models

DOI PyPI

Characterizes the dynamical regime of a model from a single long trajectory:

  • Lyapunov exponents
  • Delay embedding (optimal lag + false nearest neighbours)
  • Regime classification (fixed point / limit cycle period-k / frequency-locked / quasiperiodic / chaotic)
  • Yields a per-case diagnostic figure — one row of 8 panels. Example:

Figure 1: Dynamical systems diagnostics Time series | PSD | 3-D delay portrait | first-return map of local maxima | plane-crossing Poincaré section | recurrence plot | 3-D MDS | Lyapunov spectrum image

Documentation: andreanovoa.github.io/ntsa | Tutorial: tutorial_ntsa.ipynb

Key Reference: Kantz & Schreiber, Nonlinear Time Series Analysis (2004).

Install

pip install ntsa

Quickstart

from dynamodels.physical import Lorenz63
from ntsa import characterize as chz

chz.characterize([Lorenz63()], pdf_name='figs/l63.pdf')
python -m ntsa.characterize          # 4-case demo -> figs/ntsa_defaults.pdf (+ .png)

Works with any model implementing the model protocoldynamodels is the reference implementation. Part of the same ecosystem as romda (real-time bias-aware data assimilation).

Citation

If you use this repository, please cite the software archive:

@software{novoa_ntsa,
  author = {Nóvoa},
  title = {ntsa: nonlinear time-series analysis for dynamical-system models},
  publisher = {Zenodo},
  doi = {10.5281/zenodo.21843575},
  url = {https://doi.org/10.5281/zenodo.21843575},
}

The routines in this package were developed from the codes published as supplementary material of Nóvoa & Magri (2022):

@article{novoa2022jfm,
  title = {Real-time thermoacoustic data assimilation},
  journal = {Journal of Fluid Mechanics},
  volume = {948},
  pages = {A35},
  year = {2022},
  doi = {10.1017/jfm.2022.653},
  url = {https://doi.org/10.1017/jfm.2022.653},
  eprint = {2106.06409},
  archivePrefix = {arXiv},
  author = {Nóvoa and Magri},
}

Development

pip install -e ".[dev]"
python -m pytest tests/
ruff check ntsa/ tests/

Releases: bump version in pyproject.toml, then git tag vX.Y.Z && git push --tags (publishes to PyPI); docs deploy to GitHub Pages on every push to main.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntsa-0.1.1.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntsa-0.1.1-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file ntsa-0.1.1.tar.gz.

File metadata

  • Download URL: ntsa-0.1.1.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ntsa-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d0fbdd0996e123c33edae7a9b3eb88ffeec49900ef5c0a0921556d0f0425293
MD5 18fecf8cc65969315f2cb38c6932f973
BLAKE2b-256 6d832c992f94fda9f8dd20e37c7a7ac3ed11c8380bb1a266377c2f97dba1d704

See more details on using hashes here.

Provenance

The following attestation bundles were made for ntsa-0.1.1.tar.gz:

Publisher: release.yml on andreanovoa/ntsa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ntsa-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ntsa-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ntsa-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96e60a41a7e825601f654cbbd0a53b96d173e7e43550c9d44a2d1d020b2d5dcd
MD5 c4ff761940a8214b46dfbfc805a2b8f3
BLAKE2b-256 1eabaf639e29a2823c8c6f3032fec6eed6a2d2328b7b64cd8c65f444f2665b43

See more details on using hashes here.

Provenance

The following attestation bundles were made for ntsa-0.1.1-py3-none-any.whl:

Publisher: release.yml on andreanovoa/ntsa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 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