Skip to main content

User‑Defined Variables in Task Configuration

AutocleanEEG lets you add your own variables to a task’s config dictionary. The Task base class loads these into self.settings, so you can reference them anywhere in your pipeline—without changing core code.

Overview

  • Add custom keys to the task‑local config dictionary
  • Access values with self.settings.get("key", default)
  • No extra setup; available since v2.0.0

Basic Usage

  1. Define variables in config:
  1. Access variables in your Task:

Variable Types

Simple values:
Collections:
Nested structures:

Complete Example

Best Practices

Use descriptive names:
Provide defaults with get:
Group related variables:
Document intent with comments:

Integrating With Your Pipeline

Custom filtering:
Custom epoching:
Conditional analysis:

Validation & Error Handling

Validate presence and ranges:
Handle optional flags:

Advanced Patterns

Dynamic configuration:
Conditional pipelines:

Summary

  • Simple: add variables to config
  • Accessible: use self.settings.get("name", default) anywhere
  • Flexible: numbers, strings, lists, dicts, nested structures
  • Safe: encourage defaults and validation
  • Integrated: works with all AutocleanEEG steps