set_eeg_reference

Hello,

The following line would return a tuple instead of Epochs class. Can I fix it easily?

epochs = mne.io.set_eeg_reference(epochs, ref_channels=['EEG035','EEG042'], copy=True)

__version__ = '0.12.0'

Thanks,

Tadeusz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160716/4e4aa7ea/attachment.html

Hi Tadeusz,

you can take a look at the documentation here
<http://martinos.org/mne/dev/generated/mne.io.set_eeg_reference.html> - it
lists two things being returned:

   - rereferenced mne object and
   - array of reference data.

If you only want to get the re-referenced object, you can do the following:

epochs = mne.io.set_eeg_reference(epochs, ref_channels=['EEG035','EEG042'])[0]

Notice I?ve dropped copy=True argument - but it?s only because that is the
default value, so you don?t have to specify it.
You could also perform rereference in-place:

mne.io.set_eeg_reference(epochs, ref_channels=['EEG035','EEG042'], copy=False)

?

2016-07-16 18:52 GMT+02:00 Tadeusz W. Kononowicz <t.w.kononowicz at icloud.com>
: