-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Proposed documentation enhancement
Issue discussed on the forum: https://mne.discourse.group/t/average-reference-as-projector-is-recommended-for-inverse-modeling-in-documentation-but-is-in-fact-mandatory/8224
Issue observed
According to the documentation: Setting the EEG reference — MNE 1.6.1 documentation 1
It is written that:
when performing inverse imaging, MNE-Python will raise a ValueError if there are EEG channels present and something other than an average reference strategy has been specified.
But in fact, having an average rereference applied on the data before doing inverse modeling will raises an error. To not raise an error, the data object need to have an average rereference projector ready (not applied). It could be nice to clarify this as I have been surprised by an error with the "Custom EEG reference is not allowed for inverse modeling." after my data went through my preprocessing pipeline containing an average rereference step (applied because i have custom epoch rejection algorithms).
Proposed documentation enhancement
Do you think simply clarify what raises the error in the doc paragraph is sufficient or a trick to divert the problem might be interesting to add ? Like doing set_eeg_reference(ref_channels='average', projection=True) just before resolving the inverse problem even if you already applied a ref.