ode_flow_states — MATH dynsys op

• Data kinds: none → table (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.ode_flow_states(system='lorenz', params=None, x0=None, t_end=40.0, dt=0.005, method='rk4') (to call the implementation directly, import mathops; mathops.ode_flow_states(system='lorenz', params=None, x0=None, t_end=40.0, dt=0.005, method='rk4'); from the registry, opsmath.get("ode_flow_states"))

Usage

Integrate a named vector field — the trajectory, with the order you paid for.

Explicit Runge-Kutta on one of the named systems (`lorenz, rossler`,

`harmonic, linear). method="rk4"` is the classical 4th-order step;

`method="euler"` is there as a control group — the same picture comes out

of both, and only the error tells them apart.

★Why the field is a name, not a function: the typed ledger registers inputs

by sort and the chain fuzzer builds arguments from data, so a callable can

never be reached from there. A name (or, for `linear`, the matrix itself in

`params`) keeps every op in this family reachable from the ledger.

★Why this earns its place: for `system="linear"` the exact solution is

`expm(A t) x0, so the error is known in closed form — and halving dt`

divides it by 16, which is what "4th order" means. A drawing of an

attractor cannot be checked; this can.

Parameters

----------

system : str

One of `DYNSYS_SYSTEMS`.

params : floats or None

System parameters (defaults in `DYNSYS_SYSTEMS). For linear` this is

the matrix `A in row-major order (n*n` numbers).

x0 : floats or None

Initial state (default: a point on the attractor / unit first coordinate).

t_end, dt : float

Integration window and step. `t_end / dt` must stay under 4,000,000.

method : "rk4" | "euler"

Returns a `states table: t (S,) and x` (S, n).

Raises `ValueError`: unknown system or method; wrong parameter count;

non-finite input; `dt` not positive; a step count over the cap; a trajectory

that left float range (the field diverged — reported, never silently clipped).

HALCON: no operator.

Family-wide input contract (fail-closed)

Every mathops op validates its input before computing (nothing slips through silently):

• **complex input raises ValueError** — coercing to float64 silently discards the imaginary part (numpy only emits a ComplexWarning and returns a plausible-looking wrong real number). State .real/.imag/abs() explicitly, or use complexops, which handles complex data.

• **masked arrays with masked elements raise ValueError** — the implicit conversion that peels off the mask and uses the raw values underneath is refused. Say explicitly whether to fill or to drop.

• **NaN/Inf raises ValueError on every input** (refused with the count stated — it propagates through the whole result).

• Shapes are strict: 1-D and 2-D are never implicitly promoted or broadcast (a matrix in a vector slot, or a vector in a matrix slot, raises ValueError; reshape explicitly).

• Size cap: ops that take a matrix, and the stat_histogram bins, raise ValueError beyond mathops.MAX_ELEMENTS (2^26 ≈ 67 million elements).

Detailed usage guide

• math_metrology family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_what_a_picture_cannot_check — py -3.11 examples/poc_what_a_picture_cannot_check.py

Ops the type connects to (they accept table as input)

dynsys_poincare_section

Same category (dynsys)

ode_vector_field_grid · dynsys_poincare_section · dynsys_lyapunov_spectrum · dynsys_bifurcation_map · dynsys_correlation_dimension


*Provenance: mathops.py — MATH operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.