Difference in "raw.set_channel_types" "eog" vs "eeg"

Hello :slight_smile:

what does mne compute or not, if I set a channel to “eog” or “eeg”?
I accidently set the mastoid reference electrode to “eog” instead of “eeg” and after preprocessing and ERP analysis, I got the following plot that is the grand average ERP from one subject:
When I noticed it and changed the channel to “eeg”, I got a very different, actually more reasonable plot (in regard to amplitude size and P300):

So I wonderd, what the computational difference between setting a channel to “eog” respectivly “eeg” is?

Thank you :slight_smile:

Hello Franzi,

it’s quite simple: EEG is a data channel to MNE, while EOG is not.

This means that e.g. when calculating an evoked object (an ERP), EOG channels will not be included in the calculation. See this example:

# %%
import mne


sample_dir = mne.datasets.sample.data_path()
sample_fname = sample_dir / 'MEG' / 'sample' / 'sample_audvis_raw.fif'

raw = mne.io.read_raw_fif(sample_fname)

events = mne.find_events(raw, stim_channel='STI 014')
epochs = mne.Epochs(raw, events=events, preload=True)

# Only keep EEG and EOG channels
epochs.pick_types(eeg=True, eog=True)
print(f'Epochs have: {len(epochs.ch_names)} channels')

# Calculate the ERP
evoked = epochs.average()
print(f'Evoked has: {len(evoked.ch_names)} channels')

This produces the following output:

Epochs have: 60 channels
Evoked has: 59 channels

The evoked object has one less channel because the EOG channel was discarded.

I hope this helps!


1 Like

Thank you very much!! This helped! :slight_smile:


1 Like