mne.rename_channels#
- mne.rename_channels(info, mapping, allow_duplicates=False, *, on_missing='raise', verbose=None)[source]#
Rename channels.
- Parameters:
- info
mne.Info The
mne.Infoobject with information about the sensors and methods of measurement. Note: modified in place.- mapping
dict|callable() A dictionary mapping the old channel to a new channel name e.g.
{'EEG061' : 'EEG161'}. Can also be a callable function that takes and returns a string.Changed in version 0.10.0: Support for a callable function.
- allow_duplicatesbool
If True (default False), allow duplicates, which will automatically be renamed with
-Nat the end.New in v0.22.0.
- on_missing‘raise’ | ‘warn’ | ‘ignore’
Can be
'raise'(default) to raise an error,'warn'to emit a warning, or'ignore'to ignore when entries in ch_names are not present in the raw instance.New in v0.23.0.
New in v1.11.0.
- 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.
- info