def tvb_simulation(file, gc, simTime): connectivity.speed = np.array([10.]) sim_time = simTime sim = simulator.Simulator( model=ReducedSetHindmarshRose(), connectivity=connectivity.Connectivity.from_file(file), coupling=coupling.Linear(a=np.array([gc])), simulation_length=sim_time, integrator=integrators.HeunStochastic( dt=0.01220703125, noise=noise.Additive( nsig=np.array([0.00001]), ntau=0.0, random_stream=np.random.RandomState(seed=42))), monitors=(monitors.TemporalAverage(period=1.), monitors.Raw(), monitors.ProgressLogger(period=1e2))).configure() sim.configure() (tavg_time, tavg_data), (raw_time, raw_data), _ = sim.run() return raw_time, raw_data
def test_ReducedSet_HindmarshRose(self): from tvb.simulator.models.stefanescu_jirsa import ReducedSetHindmarshRose from tvb.simulator._opencl.cl_models import CL_ReducedSetHindmarshRose self.validate(ReducedSetHindmarshRose(), CL_ReducedSetHindmarshRose(), CL_ReducedSetHindmarshRose.n_states,3)