Site navigation:


Tutorials

These tutorial pages illustrate how to use PyDSTool to study a variety of dynamical systems. It is partly inspired by the XPP tutorial, from which it borrows some of the examples. You are presumed to have read this section on the Getting Started page to get acquainted with some basic steps.

If you have the latest version of the PyDSTool package installed (see the CodeTopics page), you can follow the tutorial code examples in the /examples/ directory. Unless otherwise specified, all the examples will use integrators that will work "out of the box", but you can adapt the scripts to use the faster C-based integrators if you have the appropriate dependencies installed (see the Getting Started page).

[Examples without links are still in development - come back soon or contribute on github!]

Elementary examples:

These introductory examples do not necessarily show off the full power of the package, but introduce different aspects in simple steps.

  1. A long introductory discussion of programmatic elements and Python syntax issues involved in building a very simple linear differential equation model for simple harmonic motion. This is aimed at those new to Python and programmatic environments in general.
  2. A 1D nonlinear ODE, a Calcium channel model with bifurcation analysis and plotting
  3. The Lorenz discrete 1D mapping and its Lyapunov exponent
  4. Using a symbolic Jacobian to speed up integration of a very stiff system
  5. Adding a zero-crossing event to the Van der Pol oscillator (includes phase plane analysis)
  6. Importing systems biology models from SBML
  7. Importing neuroscience models from NineML
  8. Adding noise to an ODE system
  9. [More to come...]

Intermediate examples:

Examples without links are not yet written up as a full tutorial, but corresponding scripts can be found in the examples/ directory of the package download.

  1. Combining tools: A 4D predator-prey model specified with symbolic objects, using bifurcation analysis and 3D plotting
  2. Specifiying large, ordered systems with macros
  3. Model reduction and dominant scale analysis: for now, see examples/HH_DSSRT.py and the supplemental material in my PLoS Computational Biology 2012 paper about this.
  4. Computing saddle stable and unstable manifolds in a phase plane system.
  5. Finding periodic orbits using mappings in a reduced 2D biomechanics model
  6. Parameter estimation example using a Hodgkin-Huxley neuron model
  7. Hybrid dynamical system models (currently only in PDF format, as the supplemental text to the recent PLoS Compututational Biology article)
  8. Noisy neuron membranes using symbolic objects and the neural toolbox (simple example of integrating a stochastic ODE)

Other examples provided in the download:

See the examples/ directory for all the scripts. Most of these files perform user-understandable tests and often demonstrate features verbosely.


PyDSTool source code is hosted by:

Get PyDSTool at SourceForge.net. Fast, secure and Free Open Source software downloads