lw_pipeline.helper.mne.find_ch#

lw_pipeline.helper.mne.find_ch(identifier, ch_names, return_identifiers=False, error_level='ignore')[source]#

Find actual channel name by identifier (e.g. Fp1 for “EEG Fp1”).

Parameters:
  • identifier (str | list of str) – The identifier to search for (e.g. “Fp1”) or list of identifiers.

  • ch_names (list of str) – The list of channel names to search in.

  • return_identifiers (bool) – Whether to return the identifiers of found channels. Only used if identifier is a list.

  • error_level (str) – The error level to use if the channel is not found. Can be “ignore”, “warn”, or “raise”.

Returns:

ch_name – The actual channel name if found, else None.

Return type:

str | None