def __init__(self): """ Initialise the structural information, coupling function, and monitors. """ # Initialise some Monitors with period in physical time raw = monitors.Raw() gavg = monitors.GlobalAverage(period=2 ** -2) subsamp = monitors.SubSample(period=2 ** -2) tavg = monitors.TemporalAverage(period=2 ** -2) # DON'T load a projection because it'll make this behave like it # has a surface and do very, very bad things eeg = monitors.EEG(sensors=SensorsEEG(load_file="eeg_brainstorm_65.txt"), period=2 ** -2) eeg2 = monitors.EEG(sensors=SensorsEEG(load_file="eeg_brainstorm_65.txt"), period=2 ** -2, reference='Fp2') # EEG with a reference electrode meg = monitors.MEG(sensors=SensorsMEG(load_file='meg_brainstorm_276.txt'), period=2 ** -2) self.monitors = (raw, gavg, subsamp, tavg, eeg, eeg2, meg) self.method = None self.sim = None
def __init__(self): """ Initialise the structural information, coupling function, and monitors. """ # Initialise some Monitors with period in physical time raw = monitors.Raw() gavg = monitors.GlobalAverage(period=2 ** -2) subsamp = monitors.SubSample(period=2 ** -2) tavg = monitors.TemporalAverage(period=2 ** -2) eeg = monitors.EEG(load_default=True, period=2 ** -2) eeg2 = monitors.EEG(load_default=True, period=2 ** -2, reference='Fp2') # EEG with a reference electrode meg = monitors.MEG(load_default=True, period=2 ** -2) self.monitors = (raw, gavg, subsamp, tavg, eeg, eeg2, meg) self.method = None self.sim = None
def setup_method(self): oscillator = models.Generic2dOscillator() white_matter = connectivity.Connectivity(load_file='connectivity_' + str(self.n_regions) + '.zip') white_matter.speed = numpy.array([self.speed]) white_matter_coupling = coupling.Difference(a=self.coupling_a) heunint = integrators.HeunStochastic( dt=2**-4, noise=noise.Additive(nsig=numpy.array([ 2**-10, ]))) mons = ( monitors.EEG(projection=ProjectionMatrix( load_file='projection_eeg_65_surface_16k.npy'), sensors=SensorsEEG(load_file="eeg_brainstorm_65.txt"), period=self.period), monitors.MEG( projection=ProjectionMatrix( load_file='projection_meg_276_surface_16k.npy'), sensors=SensorsMEG(load_file='meg_brainstorm_276.txt'), period=self.period), monitors.iEEG(projection=ProjectionMatrix( load_file='projection_seeg_588_surface_16k.npy'), sensors=SensorsInternal(load_file='seeg_588.txt'), period=self.period), ) local_coupling_strength = numpy.array([2**-10]) region_mapping = RegionMapping(load_file='regionMapping_16k_' + str(self.n_regions) + '.txt') default_cortex = Cortex( region_mapping_data=region_mapping, load_file="cortex_16384.zip" ) #region_mapping_file="regionMapping_16k_192.txt") default_cortex.coupling_strength = local_coupling_strength self.sim = simulator.Simulator(model=oscillator, connectivity=white_matter, coupling=white_matter_coupling, integrator=heunint, monitors=mons, surface=default_cortex) self.sim.configure()
def test_monitor_meg(self): monitor = monitors.MEG() assert monitor.period == self.default_period
def test_monitor_meg(self): monitor = monitors.MEG() self.assertEqual(monitor.period, self.default_period)