Last active
December 29, 2015 06:19
-
-
Save pravsripad/7628528 to your computer and use it in GitHub Desktop.
Bug passing picks to epochs.average()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import matplotlib.pylab as pl | |
import numpy as np | |
import mne | |
from mne.fiff import Raw | |
from mne.datasets import sample | |
data_path = sample.data_path() | |
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif' | |
raw = Raw(raw_fname, preload=True) | |
# Simply setting new bads. | |
raw.info['bads'] = ['MEG 0111', 'MEG 2443'] | |
picks = mne.fiff.pick_types(raw.info, meg=True, exclude='bads') | |
tmin, tmax, event_id = -0.2, 0.5, 1 | |
baseline = (None, 0) | |
reject = None | |
events = mne.find_events(raw, stim_channel='STI 014') | |
epochs = mne.Epochs(raw, events, event_id, tmin, tmax, proj=False, picks=picks, | |
baseline=baseline, preload=True, reject=reject) | |
evoked = epochs.average(picks) | |
evoked.plot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment