%matplotlib widget
import matplotlib.pyplot as plt
import numpy
from tvb.simulator.lab import *
Gustavo et al and Hansen et al 2015 used the reduced Wong-Wang model to reproduce certain aspects of human resting state fMRI. This is a 1D model, so we can tune its parameters simply by plotting the derivative as a function of the state variable:
rww = models.ReducedWongWang(a=numpy.array([0.27]), w=numpy.array([1.0]), I_o=numpy.array([0.3]))
S = numpy.linspace(0, 1, 50).reshape((1, -1, 1))
C = S * 0.0
dS = rww.dfun(S, C)
plt.figure()
plt.plot(S.flat, dS.flat)
And a short simulation
sim = simulator.Simulator(
model=rww,
connectivity=connectivity.Connectivity.from_file(),
coupling=coupling.Linear(a=numpy.array([0.5 / 50.0])),
integrator=integrators.EulerStochastic(dt=1, noise=noise.Additive(nsig=numpy.array([1e-5]))),
monitors=(monitors.TemporalAverage(period=1.),),
simulation_length=5e3
).configure()
(time, data), = sim.run()
plt.figure()
plt.plot(time, data[:, 0, :, 0], 'k', alpha=0.1);
[DPA_2013] Deco Gustavo, Ponce Alvarez Adrian, Dante Mantini, Gian Luca Romani, Patric Hagmann and Maurizio Corbetta. Resting-State Functional Connectivity Emerges from Structurally and Dynamically Shaped Slow Linear Fluctuations. The Journal of Neuroscience 32(27), 11239-11252, 2013.