eegprep.eeg_decodechan#
- eegprep.eeg_decodechan(chanlocs, chanstr, field='labels', ignoremissing=False)#
Resolve channel identifiers to 0-based indices and labels.
- Supports:
chanlocs as a list-like of dicts, or a dict with key “chanlocs”.
chanstr as an iterable of strings and/or integers.
Matching on the specified field (e.g., “labels” or “type”).
Numeric 0-based indices as input (returned directly after validation).
Empty chanlocs with purely numeric input (indices passthrough).
Parameters#
- chanlocslist of dict or dict
Channel locations or {‘chanlocs’: […]}
- chanstriterable
Channel identifiers (strings or ints)
- fieldstr, optional
Field to match on (default ‘labels’)
- ignoremissingbool, optional
Ignore missing channels (default False)
Returns#
- chanindslist
Sorted list of 0-based indices
- chanlist_outlist
List of labels/types from chanlocs for those indices or indices if empty