braindecode.preprocessing.SetMontage#
- class braindecode.preprocessing.SetMontage(montage, match_case=True, match_alias=False, on_missing='raise', verbose=None)[source]#
Braindecode preprocessor wrapper for
set_montage().Set EEG/sEEG/ECoG/DBS/fNIRS channel positions and digitization points.
- Parameters:
- montageNone | str | DigMontage
A montage containing channel positions. If a string or
DigMontageis specified, the existing channel information will be updated with the channel positions from the montage. Valid strings are the names of the built-in montages that ship with MNE-Python; you can list those viamne.channels.get_builtin_montages(). IfNone(default), the channel positions will be removed from theInfo.- match_casebool
If True (default), channel name matching will be case sensitive.
Added in version 0.20.
- match_aliasbool | dict
Whether to use a lookup table to match unrecognized channel location names to their known aliases. If True, uses the mapping in
mne.io.constants.CHANNEL_LOC_ALIASES. If adictis passed, it will be used instead, and should map from non-standard channel names to names in the specifiedmontage. Default isFalse.Added in version 0.23.
- on_missing‘raise’ | ‘warn’ | ‘ignore’
Can be
'raise'(default) to raise an error,'warn'to emit a warning, or'ignore'to ignore when channels have missing coordinates.Added in version 0.20.1.
- verbosebool | str | int | None
Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- Returns:
- instinstance of Raw | Epochs | Evoked
The instance, modified in-place.
See also
Notes
Warning
Only EEG/sEEG/ECoG/DBS/fNIRS channels can have their positions set using a montage. Other channel types (e.g., MEG channels) should have their positions defined properly using their data reading functions.
Warning
Applying a montage will only set locations of channels that exist at the time it is applied. This means when re-referencing make sure to apply the montage only after calling
mne.add_reference_channels()
Examples using braindecode.preprocessing.SetMontage#
Comprehensive Preprocessing with MNE-based Classes