Ejemplo n.º 1
0
def make_sim(sim_len=1000.0):
    sim = simulator.Simulator(
        connectivity=connectivity.Connectivity.from_file(),
        model=models.MontbrioPazoRoxin(),
        integrator=integrators.HeunStochastic(
            dt=0.1, noise=noise.Additive(nsig=np.r_[0.001])),
        monitors=[monitors.Raw()],
        simulation_length=sim_len)
    sim.configure()
    return sim
Ejemplo n.º 2
0
    def test_infinite_theta(self):
        model = models.MontbrioPazoRoxin()
        self._validate_initialization(model, 2)

        model = models.CoombesByrne()
        self._validate_initialization(model, 4)

        model = models.CoombesByrne2D()
        self._validate_initialization(model, 2)

        model = models.GastSchmidtKnosche_SD()
        self._validate_initialization(model, 4)

        model = models.GastSchmidtKnosche_SF()
        self._validate_initialization(model, 4)

        model = models.DumontGutkin()
        self._validate_initialization(model, 8)
Ejemplo n.º 3
0
 def _tvb_sim(self, dt):
     import numpy as np
     from tvb.simulator.simulator import Simulator, models, connectivity, monitors
     sim = Simulator(
         connectivity=connectivity.Connectivity.from_file(),
         model=models.MontbrioPazoRoxin(I=np.r_[1.0],
                                        Delta=np.r_[1.0],
                                        eta=np.r_[-5.0],
                                        tau=np.r_[100.0],
                                        J=np.r_[15.],
                                        cr=np.r_[0.01],
                                        cv=np.r_[0.0]),
         integrator=self._integrator(dt=dt),
         monitors=[monitors.Raw()],
     ).configure()
     assert sim.history.buffer.shape == (513, 2, 76, 1)
     sim.history.buffer[:, 0] = 0.0
     sim.history.buffer[:, 1] = -2.0
     sim.current_state[:] = sim.history.buffer[0]
     return sim