we're recording EEG with a 64 electrodes cap, using Oz as reference.
The final data are in brainvision format and when I call raw.info, the list
chs has 64 items:
63 EEG and 1 STIM.
For further analysis reasons (topomaps etc.) I would like to reconstruct
the Oz channel,
so to have 64 EEG channels.
EEG records voltage, which is the difference in electric potential between two points. The voltage between a reference electrode and itself is always zero. Interpolating this channel from the surrounding channels will give you approximately the same answer: the voltage at the reference electrode is zero.
The mne.add_reference_channels function will add the reference channel for you set it to zero.
This means that when you use channel Oz as a reference channel, you will not be able to clearly see occipital activity (activity in that region will translate to an inverse of this activity in the frontal regions). In this case it makes sense to transform to an average reference. With this reference, the voltage will reflect the difference in electric potential between each electrode and the mean of all electrodes. This is usually easier to interpret.
A call to set_eeg_reference(ref_channels=None) should accomplish this. The error you get is related to MNE being hesitant to move from some custom reference to an average reference (this limitation has been removed in the development version of MNE). What kind of reference did you use when extracting the epochs? At any rate, you can disable the error message by manually setting epochs_clean.info[?custom_ref_applied?] = False.
Dear Marijn,
thank you very much for your answer, it really clarified my ideas about
this issue.
I didn't apply any other reference before extracting the epochs so I guess
it's still Oz (even if I'm not able to see that channel). I will defenately
use the average reference!
Again, this really helped, thank you.