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
Esempio n. 2
0
    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.from_file()
        eeg.period = 2**-2
        eeg2 = monitors.EEG.from_file()
        eeg2.period = 2**-2
        eeg2.reference = 'Fp2'  # EEG with a reference electrode
        meg = monitors.MEG.from_file()
        meg.period = 2**-2

        self.monitors = (raw, gavg, subsamp, tavg, eeg, eeg2, meg)

        self.method = None
        self.sim = None

        self.stim_nodes = numpy.r_[10, 20]
        self.stim_value = 3.0
Esempio n. 3
0
    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)
        #spheeg  = monitors.SphericalEEG(sensors=sens_eeg, period=2 ** -2)
        #sphmeg  = monitors.SphericalMEG(sensors=sens_meg, period=2 ** -2)
        # TODO test all monitors

        self.monitors = (raw, gavg, subsamp, tavg)

        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
Esempio n. 5
0
 def test_monitor_subsample(self):
     monitor = monitors.SubSample()
     assert monitor.period == self.default_period
Esempio n. 6
0
    ###      empfc_path="/Users/jzimmermann/Documents/AD/Data/" + subject_id + "_FC.mat")

    sub_sim = Subject_Simulation(
        subject=sub
    )  # creating an instance of class Subject_Simulation = creating a new simulation

    sim_results = [
    ]  # will hold a list of all the dictionaries, each dictionary represents one param combo and results

    # for (K11, K12, K21) in product(K11range, K12range, K21range):
    for (linear_coupling, conduction_speed) in product(linear_coupling_range,
                                                       conduction_speed_range):

        # PE with SubSample:
        what_to_watch = monitors.SubSample(
            period=period_length_subsample,
            variables_of_interest=variables_of_interest)
        sim_result = sub_sim.prepare_and_run(
            what_to_watch=what_to_watch,
            linear_coupling=linear_coupling.item(),
            conduction_speed=conduction_speed.item(),
            K11=K11,
            K12=K12,
            K21=K21,
            simulation_length=simulation_length_PE,
            period_length=period_length_subsample)

        # PE with BOLD:
        # what_to_watch = monitors.Bold(period=period_length_bold, hrf_kernel=equations.MixtureOfGammas(), variables_of_interest = variables_of_interest) # Set hemodynamic response function (hrf) to gamma kernal rather than the voltera kernal
        # sim_result = sub_sim.prepare_and_run(what_to_watch = what_to_watch, linear_coupling=linear_coupling.item(), conduction_speed=conduction_speed.item(),  K11=K11, K12=K12, K21=K21, simulation_length=simulation_length_PE, period_length=period_length_bold)
Esempio n. 7
0
 def test_monitor_subsample(self):
     monitor = monitors.SubSample()
     self.assertEqual(monitor.period, self.default_period)