- class braindecode.preprocessing.SetEEGReference(ref_channels='average', projection=False, ch_type='auto', forward=None, *, joint=False, verbose=None)#
Specify which reference to use for EEG data.
Use this function to explicitly specify the desired reference for EEG. This can be either an existing electrode or a new virtual channel. This function will re-reference the data according to the desired reference.
- ref_channelslist of str | str
The name(s) of the channel(s) used to construct the reference.
'average'to apply an average reference (default)
'REST'to use the Reference Electrode Standardization Technique infinity reference :footcite:`Yao2001`.
An empty list, in which case MNE will not attempt any re-referencing of the data
ref_channels='average'this argument specifies if the average reference should be computed as a projection (True) or not (False; default). If
projection=True, the average reference is added as a projection and is not applied to the data (it can be applied afterwards with the
projection=False, the average reference is directly applied to the data. If
projectionmust be set to
False(the default in this case).
- ch_typelist of str | str
The name of the channel type to apply the reference to. Valid channel types are
'auto', the first channel type of eeg, ecog, seeg or dbs that is found (in that order) will be selected.
New in version 0.19.
Changed in version 1.2:
list-of-stris now supported with
- forwardinstance of Forward | None
Forward solution to use. Only used with
New in version 0.21.
How to handle list-of-str
ch_type. If False (default), one projector is created per channel type. If True, one projector is created across all channel types. This is only used when
New in version 1.2.
- verbosebool | str | int | None
- instinstance of Raw | Epochs | Evoked
Data with EEG channels re-referenced. If
projection=Truea projection will be added instead of directly re-referencing the data.
Convenience function for creating bipolar references.
Some common referencing schemes and the corresponding value for the
- Average reference:
A new virtual reference electrode is created by averaging the current EEG signal by setting
ref_channels='average'. Bad EEG channels are automatically excluded if they are properly set in
- A single electrode:
ref_channelsto a list containing the name of the channel that will act as the new reference, for example
- The mean of multiple electrodes:
A new virtual reference electrode is created by computing the average of the current EEG signal recorded from two or more selected channels. Set
ref_channelsto a list of channel names, indicating which channels to use. For example, to apply an average mastoid reference, when using the 10-20 naming scheme, set
The given EEG electrodes are referenced to a point at infinity using the lead fields in
forward, which helps standardize the signals.
If a reference is requested that is not the average reference, this function removes any pre-existing average reference projections.
During source localization, the EEG signal should have an average reference.
In order to apply a reference, the data must be preloaded. This is not necessary if
For an average or REST reference, bad EEG channels are automatically excluded if they are properly set in
New in version 0.9.0.
See more details in mne.channels.channels.set_eeg_reference