braindecode.preprocessing.AddReferenceChannels#
- class braindecode.preprocessing.AddReferenceChannels(ref_channels, copy=True)[source]#
Braindecode preprocessor wrapper for
add_reference_channels().Add reference channels to data that consists of all zeros.
Adds reference channels to data that were not included during recording. This is useful when you need to re-reference your data to different channels. These added channels will consist of all zeros.
- Parameters:
- instinstance of Raw | Epochs | Evoked
Instance of Raw or Epochs with EEG channels and reference channel(s).
- ref_channelsstr | list of str
Name of the electrode(s) which served as the reference in the recording. If a name is provided, a corresponding channel is added and its data is set to 0. This is useful for later re-referencing.
- copybool
Specifies whether the data will be copied (True) or modified in-place (False). Defaults to True.
- Returns:
- instinstance of Raw | Epochs | Evoked
Data with added EEG reference channels.
Notes
Warning
When re-referencing, make sure to apply the montage using
mne.io.Raw.set_montage()only after calling this function. Applying a montage will only set locations of channels that exist at the time it is applied.