I want to perform source reconstruction on MEG data and
I have this error
*** ValueError: EEG average reference is mandatory for inverse
modeling, use set_eeg_reference method. ***
Looking at the code, I think the problem is in the _check_reference function
of inverse.py module. This function calls _needs_eeg_average_ref_proj that
picks the eeg channels.
In my data eeg_sel contains 'ECG', 'VEOG', 'HEOG', thus
(len(eeg_sel) > 0
This implies that I need to set a reference, but since the average
reference throws an exception I got another error
*** ValueError: Custom EEG reference is not allowed for inverse modeling.***
I think the problem is that these channels have not to be assumed as
eeg channels.
my question is...why do I have to set the reference if I have
only MEG data?
It seems that the problem is that the ECG, and EOG channels are considered
as EEG ones and thus is required an usefulness average reference.
Indeed if I set
raw.set_eeg_reference('average')
I get this error
*** ValueError: Custom EEG reference is not allowed for inverse modeling.***