models Package

Noise

Integrators¶

Defines a set of integration methods for both deterministic and stochastic differential equations.

Using an integration step size dt from the following list:
[0.244140625, 0.1220703125, 0.06103515625, 0.048828125, 0.0244140625, 0.01220703125, 0.009765625, 0.006103515625, 0.0048828125]

will be consistent with Monitor periods corresponding to any of [4096, 2048, 1024, 512, 256, 128] Hz

# TODO: error analysis

tvb.simulator.integrators.Integrator[source]

The Integrator class is a base class for the integration methods...

 [1] Kloeden and Platen, Springer 1995, Numerical solution of stochastic differential equations.
 [2] Riccardo Mannella, Integration of Stochastic Differential Equations on a Computer, Int J. of Modern Physics C 13(9): 1177–1194, 2002.
 [3] R. Mannella and V. Palleschi, Fast and precise algorithm for computer simulation of stochastic differential equations, Phys. Rev. A 40: 3381, 1989.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.IntegratorStochastic[source]

The IntegratorStochastic class is a base class for the stochastic integration methods. It derives from the Integrator abstract base class.

We consider a stochastic differential equation has the generic form:

$\dot{X}_i(t) = dX_i(\vec{X}) + g_i(\vec{X}) \xi(t)$

where we assume that the stochastic process $$\xi$$ is a Gaussian forcing. In the deterministic case, $$g(X)$$ would be zero. The full algorithm, for one external stochastic forcing which is additive, is:

$X_i(t) = X_i(0) + g_i(X) Z_1(t) + dX_i t + Z_2(t) dX_{i,k} g_k(X) + 0.5 dX_{i,jk} g_j(X) g_k(X) Z_3(t) + 0.5 t^2 dX_{i,j} dX_j$

where $$Z_1$$, $$Z_2$$ and $$Z_3$$ are Gaussian variables, assuming the Einstein notation and defining:

$dX_{i,j} = \frac{\partial dX_i}{\partial X_j}$

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.
tvb.simulator.integrators.HeunDeterministic[source]

It is a simple example of a predictor-corrector method. It is also known as modified trapezoidal method, which uses the Euler method as its predictor. And it is also a implicit integration scheme.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.HeunStochastic[source]

It is a simple example of a predictor-corrector method. It is also known as modified trapezoidal method, which uses the Euler method as its predictor.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.
tvb.simulator.integrators.EulerDeterministic[source]

It is the simplest difference methods for the initial value problem. The recursive structure of Euler scheme, which evaluates approximate values to the Ito process at the discretization instants only, is the key to its successful implementation.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.EulerStochastic[source]

It is the simplest difference methods for the initial value problem. The recursive structure of Euler scheme, which evaluates approximate values to the Ito process at the discretization instants only, is the key to its successful implementation.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.
tvb.simulator.integrators.RungeKutta4thOrderDeterministic[source]

The Runge-Kutta method is a standard procedure with most one-step methods.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.Identity[source]

The Identity integrator does not apply any scheme to the provided dfun, only returning its results.

This allows the model to determine its stepping scheme directly, and may be used for difference equations and cellular automata.

traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
class tvb.simulator.integrators.SciPyODEBase[source]

Provides a base class for integrators using SciPy’s ode class.

class tvb.simulator.integrators.SciPyODE[source]
scheme(X, dfun, coupling, local_coupling, stimulus)[source]
class tvb.simulator.integrators.SciPySDE[source]
scheme(X, dfun, coupling, local_coupling, stimulus)[source]
tvb.simulator.integrators.VODE[source]

traited class VODE traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.VODEStochastic[source]

traited class VODEStochastic traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.
tvb.simulator.integrators.Dopri5[source]

traited class Dopri5 traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.Dopri5Stochastic[source]

traited class Dopri5Stochastic traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.
tvb.simulator.integrators.Dop853[source]

traited class Dop853 traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
tvb.simulator.integrators.Dop853Stochastic[source]

traited class Dop853Stochastic traits on this class:

clamped_state_variable_indices (indices of the state variables to be clamped by the integrators to the values in the clamped_values array)

default: None
clamped_state_variable_values (The values of the state variables which are clamped )

default: None
dt (Integration-step size (ms))
The step size used by the integration routine in ms. This should be chosen to be small enough for the integration to be numerically stable. It is also necessary to consider the desired sample period of the Monitors, as they are restricted to being integral multiples of this value. The default value is set such that all built-in models are numerically stable with there default parameters and because it is consitent with Monitors using sample periods corresponding to powers of 2 from 128 to 4096Hz.
default: 0.01220703125
noise (Integration Noise)
The stochastic integrator’s noise source. It incorporates its own instance of Numpy’s RandomState.