braindecode.preprocessing.EqualizeChannels#
- class braindecode.preprocessing.EqualizeChannels(copy=True, verbose=None)[source]#
Braindecode preprocessor wrapper for
equalize_channels().Equalize channel picks and ordering across multiple MNE-Python objects.
First, all channels that are not common to each object are dropped. Then, using the first object in the list as a template, the channels of each object are re-ordered to match the template. The end result is that all given objects define the same channels, in the same order.
- Parameters:
- instanceslist
A list of MNE-Python objects to equalize the channels for. Objects can be of type Raw, Epochs, Evoked, Spectrum, AverageTFR, Forward, Covariance, CrossSpectralDensity or Info.
Changed in version 1.11: Added support for
mne.time_frequency.Spectrumobjects.- copybool
When dropping and/or re-ordering channels, an object will be copied when this parameter is set to
True. When set toFalse(the default) the dropping and re-ordering of channels happens in-place.Added in version 0.20.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.
- Returns:
- equalized_instanceslist
A list of MNE-Python objects that have the same channels defined in the same order.
Methods
- fn(copy=True, verbose=None)[source]#
Equalize channel picks and ordering across multiple MNE-Python objects.
First, all channels that are not common to each object are dropped. Then, using the first object in the list as a template, the channels of each object are re-ordered to match the template. The end result is that all given objects define the same channels, in the same order.
- Parameters:
instances (list) –
A list of MNE-Python objects to equalize the channels for. Objects can be of type Raw, Epochs, Evoked, Spectrum, AverageTFR, Forward, Covariance, CrossSpectralDensity or Info.
Changed in version 1.11: Added support for
mne.time_frequency.Spectrumobjects.copy (bool) –
When dropping and/or re-ordering channels, an object will be copied when this parameter is set to
True. When set toFalse(the default) the dropping and re-ordering of channels happens in-place.Added in version 0.20.0.
verbose (bool | 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:
equalized_instances – A list of MNE-Python objects that have the same channels defined in the same order.
- Return type: