mne.pick_channels#

mne.pick_channels(ch_names, include, exclude=[], ordered=None, *, verbose=None)[source]#

Pick channels by names.

Returns the indices of ch_names in include but not in exclude.

Parameters:
ch_nameslist of str

List of channels.

includelist of str

List of channels to include (if empty include all available).

Note

This is to be treated as a set. The order of this list is not used or maintained in sel.

excludelist of str

List of channels to exclude (if empty do not exclude any channel). Defaults to [].

orderedbool

If True (default False), ensure that the order of the channels in the modified instance matches the order of ch_names.

New in v0.20.0.

Changed in version 1.5: The default changed from False in 1.4 to True in 1.5.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
selarray of int

Indices of good channels.

Examples using mne.pick_channels#

The Info data structure

The Info data structure

Working with eye tracker data in MNE-Python

Working with eye tracker data in MNE-Python

EEG analysis - Event-Related Potentials (ERPs)

EEG analysis - Event-Related Potentials (ERPs)

Non-parametric 1 sample cluster statistic on single trial power

Non-parametric 1 sample cluster statistic on single trial power