Skip to content

Configuration Guide

AutoClean uses a YAML configuration file to control pipeline behavior. This guide explains all available configuration options.

Basic Configuration

Here's a minimal configuration example:

task: resting_eyesopen
eeg_system: biosemi64
input_file: /path/to/your/eeg/file.bdf

Environment Variables

AutoClean requires two environment variables:

  • AUTOCLEAN_DIR: Root directory for output files
  • AUTOCLEAN_CONFIG: Path to your configuration YAML file

You can set these in your .env file or export them directly:

export AUTOCLEAN_DIR=/path/to/output
export AUTOCLEAN_CONFIG=config.yml

Configuration Options

Required Settings

Option Description Type Example
task Processing task type string resting_eyesopen
eeg_system EEG system montage string biosemi64
input_file Path to input EEG file string /path/to/file.bdf

Optional Settings

Option Description Default Type
line_freq Power line frequency 60.0 float
resample_freq Resampling frequency 250 integer
ref_type Reference type average string
crop_start Start time for cropping 0 float
crop_end End time for cropping None float

Advanced Configuration

Bad Channel Detection

bad_channel_criteria:
  deviation_threshold: 3.0
  correlation_threshold: 0.4
  line_noise_threshold: 4.0

ICA Settings

ica_settings:
  n_components: 20
  random_state: 42
  method: 'fastica'

Artifact Rejection

artifact_rejection:
  amplitude_threshold: 100
  gradient_threshold: 25
  muscle_threshold: 3.0

Configuration File Location

The configuration file can be placed anywhere, but it's recommended to keep it in your project root directory. The location must be specified in the AUTOCLEAN_CONFIG environment variable.