support Laplacian referencing for EEG
See original GitHub issueDescribe the new feature or enhancement
Add support for Laplacian (sometimes called local average) referencing for EEG.
Here is one reference: https://doi.org/10.1016/j.ijpsycho.2015.04.023 though it’s part of a special issue on current source density analysis so there are likely other papers worth consulting before implementing.
Describe your proposed implementation
as a new option mne.set_eeg_reference(ref_channels='local')
The function would probably also need a new param for the distance threshold.
Describe possible alternatives
could make a dedicated function instead. set_eeg_reference
is already overloaded to handle REST referencing (with extra param forward
) so I don’t see the harm in extending it to Laplacian as well.
Additional comments
Requested on the forum https://mne.discourse.group/t/laplacian-or-local-average-reference-in-mne/3415
cross-ref to #8481 where Laplacian referencing was mentioned for sEEG, although I think the implementation for that would likely be fairly different, given the shaft-based vs scalp-based electrodes.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top GitHub Comments
@paulokanda @drammock Sometimes the terms “Laplacian” and “Current Source Density” are used interchangeably (see for example: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4610715/). Are we sure that in this context CSD (which can be done in mne) is not good enough?
IIRC the average ref is done within the Laplacian/CSD code internally, so it shouldn’t matter whether or not you apply one first. But feel free to check in code or by example
Since it changes the channel type in MNE it does a bit more than this function/method typically does. I’d rather leave it as a separate function, and just mention it somewhere in the
Notes
and/orSee Also
. Would you be up for updating the docstring ofset_eeg_reference
@DominiqueMakowski to reference the CSD function in some way that makes it more discoverable?