Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'custom_ref_applied' is True even if the offline rereferencing is an average #12407

Closed
nabilalibou opened this issue Feb 1, 2024 · 3 comments · Fixed by #12426
Closed

'custom_ref_applied' is True even if the offline rereferencing is an average #12407

nabilalibou opened this issue Feb 1, 2024 · 3 comments · Fixed by #12426
Labels

Comments

@nabilalibou
Copy link
Contributor

nabilalibou commented Feb 1, 2024

Proposed documentation enhancement

Hello,

contrary to what is written in the doc, 'custom_ref_applied' is True event if the offline rereferencing is an average one.

set_eeg_reference(ref_channels="average") raises the flag 'custom_ref_applied' even so it is said for this Attribute on https://mne.tools/stable/generated/mne.Info.html:

custom_ref_applied:
Whether a custom (=other than average) reference has been applied to the EEG data. This flag is checked by some algorithms that require an average reference to be set.

I find it strange that this flag is raised by an 'average' reref (which rereferencing does not raise it then ?) but I am guessing that there are reasons about this. if anyone could enlighten me as to the reason behind it, I'd be grateful :).
But in any case i think that this little doc paragraphe should be changed to reflect how it really works.
Since I'm already on this similar issue I volunteer to continue to spot and correct the little contradictions around rereferencing and projections in the doc.

@nabilalibou nabilalibou added the DOC label Feb 1, 2024
@larsoner
Copy link
Member

larsoner commented Feb 2, 2024

Yeah it should say "a custom (=other than average projector)` or similar. It's for inverse modeling reasons, we need to make sure an average reference over the remaining good channels is applied. Adding an average reference projector as the reference is a safe way to do this.

I find it strange that this flag is raised by an 'average' reref (which rereferencing does not raise it then ?) but I am guessing that there are reasons about this. if anyone could enlighten me as to the reason behind it, I'd be grateful :).

Let's discuss this over in #12369.

@nabilalibou
Copy link
Contributor Author

Ok thanks for the link , I'll follow the discussion #12369.
I'll open a PR to add this detail on the doc

@hoechenberger hoechenberger changed the title 'custom_ref_applied' is True event if the offline rereferencing is an average 'custom_ref_applied' is True even if the offline rereferencing is an average Feb 7, 2024
@larsoner
Copy link
Member

larsoner commented Feb 7, 2024

I think this was taken care of in #12420 and #12426

@larsoner larsoner closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants