ntsa 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ntsa-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrea Nóvoa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ntsa-0.1.0/MANIFEST.in ADDED
@@ -0,0 +1 @@
1
+ recursive-include tests *.py
ntsa-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: ntsa
3
+ Version: 0.1.0
4
+ Summary: Nonlinear time-series analysis for dynamical-system models: Lyapunov spectra, delay embeddings, regime classification, bifurcation sweeps
5
+ Author-email: Andrea Nóvoa <a.novoa@imperial.ac.uk>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/andreanovoa/ntsa
8
+ Project-URL: Repository, https://github.com/andreanovoa/ntsa
9
+ Project-URL: Issues, https://github.com/andreanovoa/ntsa/issues
10
+ Keywords: nonlinear-time-series,lyapunov-exponents,chaos,delay-embedding,bifurcation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: dynamodels<1.0,>=0.1
18
+ Requires-Dist: matplotlib<4.0,>=3.9
19
+ Requires-Dist: numpy<3.0,>=2.0
20
+ Requires-Dist: scipy<2.0,>=1.13
21
+ Requires-Dist: tqdm>=4.67
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=8.4; extra == "dev"
24
+ Requires-Dist: ruff; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # ntsa — nonlinear time-series analysis for dynamical-system models
28
+
29
+ Characterizes the dynamical regime of a model from a single long trajectory:
30
+ delay embedding (optimal lag + false nearest neighbours), Lyapunov exponents, regime
31
+ classification (fixed point / limit cycle period-k / frequency-locked / quasiperiodic / chaotic),
32
+ and a per-case diagnostic figure — one row of 8 panels
33
+ [time series | PSD | 3-D delay portrait | first-return map of local maxima | plane-crossing Poincaré section
34
+ | recurrence plot | 3-D MDS | Lyapunov spectrum] — Key Reference: Kantz & Schreiber,
35
+ *Nonlinear Time Series Analysis* (2004).
36
+
37
+ **Documentation: [andreanovoa.github.io/ntsa](https://andreanovoa.github.io/ntsa/)**
38
+ | Tutorial: [`tutorial_ntsa.ipynb`](tutorial_ntsa.ipynb)
39
+
40
+ ### Example:
41
+
42
+ <img width="2877" height="1659" alt="image" src="https://github.com/user-attachments/assets/d366a1f1-6980-4bee-ae1c-a00c514c33b4" />
43
+
44
+ ## Install
45
+
46
+ ```bash
47
+ pip install ntsa # once released; until then (dynamodels is not on PyPI yet either):
48
+ pip install "dynamodels @ git+https://github.com/andreanovoa/dynamodels" \
49
+ "ntsa @ git+https://github.com/andreanovoa/ntsa"
50
+ ```
51
+
52
+ ## Quickstart
53
+
54
+ ```python
55
+ from dynamodels.physical import Lorenz63
56
+ from ntsa import characterize as chz
57
+
58
+ chz.characterize([Lorenz63()], pdf_name='figs/l63.pdf')
59
+ ```
60
+
61
+ ```bash
62
+ python -m ntsa.characterize # 4-case demo -> figs/ntsa_defaults.pdf (+ .png)
63
+ ```
64
+
65
+ Works with any model implementing the
66
+ [model protocol](https://andreanovoa.github.io/ntsa/protocol/) —
67
+ [`dynamodels`](https://github.com/andreanovoa/dynamodels) is the reference
68
+ implementation. Part of the same ecosystem as
69
+ [romda](https://github.com/andreanovoa/real-time-bias-aware-DA) (real-time
70
+ bias-aware data assimilation).
71
+
72
+ ## Development
73
+
74
+ ```bash
75
+ pip install -e ".[dev]"
76
+ python -m pytest tests/
77
+ ruff check ntsa/ tests/
78
+ ```
79
+
80
+ Releases publish to PyPI via trusted publishing on version tags; docs deploy to
81
+ GitHub Pages on push to `main` (see `.github/workflows/`).
82
+
83
+ ## License
84
+
85
+ MIT
ntsa-0.1.0/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # ntsa — nonlinear time-series analysis for dynamical-system models
2
+
3
+ Characterizes the dynamical regime of a model from a single long trajectory:
4
+ delay embedding (optimal lag + false nearest neighbours), Lyapunov exponents, regime
5
+ classification (fixed point / limit cycle period-k / frequency-locked / quasiperiodic / chaotic),
6
+ and a per-case diagnostic figure — one row of 8 panels
7
+ [time series | PSD | 3-D delay portrait | first-return map of local maxima | plane-crossing Poincaré section
8
+ | recurrence plot | 3-D MDS | Lyapunov spectrum] — Key Reference: Kantz & Schreiber,
9
+ *Nonlinear Time Series Analysis* (2004).
10
+
11
+ **Documentation: [andreanovoa.github.io/ntsa](https://andreanovoa.github.io/ntsa/)**
12
+ | Tutorial: [`tutorial_ntsa.ipynb`](tutorial_ntsa.ipynb)
13
+
14
+ ### Example:
15
+
16
+ <img width="2877" height="1659" alt="image" src="https://github.com/user-attachments/assets/d366a1f1-6980-4bee-ae1c-a00c514c33b4" />
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ pip install ntsa # once released; until then (dynamodels is not on PyPI yet either):
22
+ pip install "dynamodels @ git+https://github.com/andreanovoa/dynamodels" \
23
+ "ntsa @ git+https://github.com/andreanovoa/ntsa"
24
+ ```
25
+
26
+ ## Quickstart
27
+
28
+ ```python
29
+ from dynamodels.physical import Lorenz63
30
+ from ntsa import characterize as chz
31
+
32
+ chz.characterize([Lorenz63()], pdf_name='figs/l63.pdf')
33
+ ```
34
+
35
+ ```bash
36
+ python -m ntsa.characterize # 4-case demo -> figs/ntsa_defaults.pdf (+ .png)
37
+ ```
38
+
39
+ Works with any model implementing the
40
+ [model protocol](https://andreanovoa.github.io/ntsa/protocol/) —
41
+ [`dynamodels`](https://github.com/andreanovoa/dynamodels) is the reference
42
+ implementation. Part of the same ecosystem as
43
+ [romda](https://github.com/andreanovoa/real-time-bias-aware-DA) (real-time
44
+ bias-aware data assimilation).
45
+
46
+ ## Development
47
+
48
+ ```bash
49
+ pip install -e ".[dev]"
50
+ python -m pytest tests/
51
+ ruff check ntsa/ tests/
52
+ ```
53
+
54
+ Releases publish to PyPI via trusted publishing on version tags; docs deploy to
55
+ GitHub Pages on push to `main` (see `.github/workflows/`).
56
+
57
+ ## License
58
+
59
+ MIT
@@ -0,0 +1,16 @@
1
+ """ntsa — nonlinear time-series analysis for dynamical-system models.
2
+
3
+ - `ntsa.tools` — delay embeddings, return/Poincaré maps, recurrence, MDS,
4
+ regime classification, bifurcation sweeps.
5
+ - `ntsa.lyapunov` — Benettin QR spectrum, leading exponent, Kaplan-Yorke.
6
+ - `ntsa.characterize` — per-case diagnostic figure rows and a demo driver
7
+ (``python -m ntsa.characterize``).
8
+
9
+ Works with any model implementing the `dynamodels.Model` interface (see the
10
+ "Model protocol" section of the README) — `dynamodels` is the reference
11
+ implementation used by the demos and tests, but any duck-type is accepted.
12
+
13
+ Reference: Kantz & Schreiber, *Nonlinear Time Series Analysis* (2nd ed., CUP 2004).
14
+ """
15
+
16
+ __version__ = "0.1.0"