ntsa.data
Data-driven front end: run the equation-free half of ntsa on a raw measured
series — no model equations required. DataSeries wraps a scalar record
\(x(t)\) sampled at fixed dt, then embeds (optimal_lag, false_nearest_neighbours),
computes the correlation dimension \(D_2\), estimates the leading Lyapunov
exponent from the data itself (lyapunov.rosenstein_lyapunov), classifies the
regime, and draws the same 8-panel diagnostic row as ntsa.characterize. Only
the methods that must re-integrate a model are bypassed: the full Lyapunov
spectrum and bifurcation sweeps.
from ntsa.data import DataSeries
ds = DataSeries(x, dt=1e-3, label='hot-wire probe')
res = ds.analyze() # zeta, dim, D2, regime, evidence, stats, MDS
ds.characterize('figs/probe.pdf')

Lorenz63 characterized from its measurements (and state snapshots for the MDS panel) only: \(\lambda_1 = 0.97 \pm 0.06\) (true 0.906), classified chaotic.
analyze(lam1='auto') (the default) runs the Rosenstein estimator, so measured
chaotic data reaches the chaotic label with no model at all; the estimator's
fit guards return nan on non-chaotic data rather than a spurious slope. Pass a
float for an external estimate, or None to skip — see the
regime classification section.
Full reference
ntsa.data
Data-driven front end: the equation-free half of ntsa on a raw measured series.
DataSeries wraps a scalar record x(t) sampled at a fixed dt and runs everything
that does not need model equations: embedding diagnostics, correlation dimension,
regime classification, signal statistics, MDS, and the 8-panel diagnostic row.
Lyapunov exponents and bifurcation sweeps need an integrable model and are
bypassed; an externally estimated lam1 can be passed through to the classifier.
DataSeries
dataclass
A measured scalar time series and its equation-free ntsa characterization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
Scalar observable, shape (Nt,). |
required |
dt
|
float
|
Sampling time. |
required |
label
|
str
|
Case label used in figure titles. |
'data'
|
Y
|
ndarray
|
Simultaneous multivariate record (Nt, N) — e.g. the full measured state —
used for the MDS panel; the delay embedding of |
None
|
trim
|
bool
|
Trim any residual transient detected by |
True
|
Source code in ntsa/data.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
analyze(lam1='auto', lam1_std=0.0, mds=True)
Run the equation-free pipeline and cache the results dict.
Same keys as one ntsa.characterize.characterize case, plus D2/d2_fit
(Grassberger-Procaccia dimension of the delay embedding — the data-only
substitute for the Kaplan-Yorke dimension). lam1='auto' (default)
estimates the leading Lyapunov exponent from the data itself with
lyapunov.rosenstein_lyapunov (nan when its fit guards reject, so
non-chaotic data never gets a spurious exponent); pass a float to use an
external estimate instead, or None to skip. spectrum stays None — a
full spectrum needs model equations.
Source code in ntsa/data.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
characterize(pdf_name='figs/ntsa_data.pdf', **analyze_kwargs)
Draw the 8-panel diagnostic row (PDF + same-name PNG) via plot_row.
Every panel is computed from the data alone; the Lyapunov panel shows
the Rosenstein (or external) lam1 marker, and the Rosenstein
log-divergence fit is appended as a second PDF page when available.
Source code in ntsa/data.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |