# Load experimental RAW files for the visual condition raw_fnames = load_data(condition=condition, data_format='raw', data_type='experimental') # Load simulation evoked files for the visual condition evoked_fnames = load_data(condition=condition, data_format='evoked', data_type='simulation') raw = Raw(raw_fnames[0]) events = find_events(raw, stim_channel="STI 014", shortest_event=1) # Visualize raw file raw.plot() # Make an evoked file from the experimental data picks = pick_types(raw.info, meg=True, eog=True, exclude='bads') # Read epochs event_id, tmin, tmax = 9, -0.2, 0.5 epochs = Epochs(raw, events, event_id, tmin, tmax, baseline=(None, 0), picks=picks, reject=dict(grad=4000e-13, mag=4e-12, eog=150e-6)) evoked = epochs.average() # average epochs and get an Evoked dataset.
condition = 'visual' # or 'auditory' or 'somatosensory' # Load experimental RAW files for the visual condition raw_fnames = load_data(condition=condition, data_format='raw', data_type='experimental') # Load simulation evoked files for the visual condition evoked_fnames = load_data(condition=condition, data_format='evoked', data_type='simulation') raw = Raw(raw_fnames[0]) events = find_events(raw, stim_channel="STI 014", shortest_event=1) # Visualize raw file raw.plot() # Make an evoked file from the experimental data picks = pick_types(raw.info, meg=True, eog=True, exclude='bads') # Read epochs event_id, tmin, tmax = 9, -0.2, 0.5 epochs = Epochs(raw, events, event_id, tmin, tmax, baseline=(None, 0), picks=picks, reject=dict(grad=4000e-13, mag=4e-12, eog=150e-6)) evoked = epochs.average() # average epochs and get an Evoked dataset. evoked.plot() # Compare to the simulated data evoked_sim = read_evokeds(evoked_fnames[0]) evoked_sim.plot()