meeg_utils.preprocessing.batch#

Batch preprocessing for multiple MEG/EEG datasets.

This module provides batch processing capabilities for preprocessing multiple datasets in parallel.

Classes

BatchPreprocessingPipeline(input_paths[, ...])

Batch preprocessing pipeline for multiple MEG/EEG datasets.

class meeg_utils.preprocessing.batch.BatchPreprocessingPipeline(input_paths, output_dir=None, n_jobs=1, use_cuda=False, random_state=42)[source]#

Batch preprocessing pipeline for multiple MEG/EEG datasets.

Parameters:
  • input_paths (list[str | Path | BIDSPath]) – List of input paths to process.

  • output_dir (str | Path | None, optional) – Output directory for all datasets. If None, uses BIDS derivatives.

  • n_jobs (int, optional) – Number of parallel jobs. Default is 1.

  • use_cuda (bool, optional) – Whether to use CUDA. Default is False.

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

input_paths#

Parsed input paths.

Type:

list[Path | BIDSPath]

output_dir#

Output directory.

Type:

Path | None

n_jobs#

Number of parallel jobs.

Type:

int

use_cuda#

CUDA flag.

Type:

bool

random_state#

Random seed.

Type:

int

__init__(input_paths, output_dir=None, n_jobs=1, use_cuda=False, random_state=42)[source]#

Initialize batch preprocessing pipeline.

run(filter_params=None, detect_bad_channels=True, remove_line_noise=True, apply_ica=True, ica_params=None, save_intermediate=False, skip_existing=False, save_logs=True, logging_level='INFO')[source]#

Run batch preprocessing on all datasets.

Parameters:
  • filter_params (dict | None, optional) – Filtering parameters.

  • detect_bad_channels (bool, optional) – Whether to detect bad channels. Default is True.

  • remove_line_noise (bool, optional) – Whether to remove line noise. Default is True.

  • apply_ica (bool, optional) – Whether to apply ICA. Default is True.

  • ica_params (dict | None, optional) – ICA parameters.

  • save_intermediate (bool, optional) – Whether to save intermediate files. Default is False.

  • skip_existing (bool, optional) – Whether to skip datasets with existing output. Default is False.

  • save_logs (bool, optional) – Whether to save log files. Default is True.

  • logging_level (str, optional) – Logging level for the batch process. Default is “INFO”.