meeg_utils.preprocessing.bad_channels#

Bad channel detection for EEG and MEG data.

Functions

detect_bad_channels_eeg(raw[, random_state])

Detect bad EEG channels using PREP pipeline.

detect_bad_channels_meg(raw[, origin])

Detect bad MEG channels using Maxwell filtering.

meeg_utils.preprocessing.bad_channels.detect_bad_channels_eeg(raw, random_state=42)[source]#

Detect bad EEG channels using PREP pipeline.

Parameters:
  • raw (BaseRaw) – Raw EEG data.

  • random_state (int, optional) – Random seed for reproducibility. Default is 42.

Returns:

List of bad channel names.

Return type:

list[str]

meeg_utils.preprocessing.bad_channels.detect_bad_channels_meg(raw, origin=(0.0, 0.0, 0.04))[source]#

Detect bad MEG channels using Maxwell filtering.

Parameters:
  • raw (BaseRaw) – Raw MEG data.

  • origin (tuple, optional) – Origin for Maxwell filtering. Default is (0.0, 0.0, 0.04).

Returns:

List of bad channel names.

Return type:

list[str]