Skip to content

Instantly share code, notes, and snippets.

@cjayb
Created June 26, 2014 12:04
Show Gist options
  • Save cjayb/2a8933ede37e9f9c24d7 to your computer and use it in GitHub Desktop.
Save cjayb/2a8933ede37e9f9c24d7 to your computer and use it in GitHub Desktop.
import mne
raw=mne.io.Raw('/aux/Lau/timingChris/PROJ0156_SUBJ0001_SER001_FILESNO001.fif',preload=False)
pick_misc = mne.pick_channels(raw.info['ch_names'], include='MISC001')
events = mne.find_events(raw, stim_channel='STI101', min_duration=0.002, consecutive=True)
# hvis 232 skal fjernes, kan det goeres saaledes
incl_range = range(100,300)
incl_range.remove(232)
eve_restrict = mne.merge_events(events, incl_range, 1, replace_events=True)
epochs = mne.Epochs(raw, eve_restrict, 1, -0.050, 0.200, picks=pick_misc, preload=True)
mne.viz.plot_image_epochs(epochs, picks=[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment