Dynamical systems & chaos analysis in Python
TSDynamics
Simulate and analyse dynamical systems with fast compiled solvers, expressive plots and 177 built-in models. Start with a known system or define your own equations.
pip install "tsdynamics[viz]"
Using TSDynamics in research? Cite the library with its DOI and BibTeX entry.
Compiled solvers, Python equations
Run flows, maps, delay equations and stochastic models from Python. The compiled Rust engine ships in the package, so installing a prebuilt wheel needs no compiler. Ordinary parameter sweeps reuse the compiled equations.
177 systems to explore
From Lorenz and Hénon to delay feedback and spatial fields. Browse equations, parameter meanings, plots and references together, then copy the example into your own work.
From trajectories to measurements
Measure stability, chaos, recurrence and attractor geometry. Results carry their settings and provide plots. Each analysis explains its supported inputs and the assumptions behind the answer.
Simulate, plot, analyse
Run a model, inspect its trajectory and estimate its Lyapunov spectrum with the same system definition.
import tsdynamics as ts
model = ts.systems.Lorenz(ic=[1, 1, 1])
trajectory = model.run(final_time=100, dt=0.01)
ts.plot(trajectory).save("lorenz.png")
spectrum = ts.analysis.lyapunov_spectrum(
model, final_time=500, dt=0.05
)
print(spectrum)
print(spectrum.kaplan_yorke)
Study the dynamics
Explore parameter changes, stability and the geometry of attraction.
Where does the behaviour change?
Sweep a parameter and reveal periodic windows, bifurcations and chaotic bands.
How sensitive is the motion?
Estimate separation rates and inspect convergence before interpreting a chaos verdict.
Which initial conditions go where?
Map competing attractors, basin boundaries and sensitivity to the starting state.