mne.pick_channels(ch_names, include, exclude=[], ordered=False)[source]

Pick channels by names.

Returns the indices of the good channels in ch_names.

ch_nameslist of str

List of channels.

includelist of str

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


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 [].


If true (default False), treat include as an ordered list rather than a set, and any channels from include are missing in ch_names an error will be raised.

New in version 0.18.

selarray of int

Indices of good channels.