User‑Defined Variables in Task Configuration
AutocleanEEG lets you add your own variables to a task’sconfig
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
- Define variables in
config
:
- Access variables in your Task:
Variable Types
Simple values:Complete Example
Best Practices
Use descriptive names:get
:
Integrating With Your Pipeline
Custom filtering:Validation & Error Handling
Validate presence and ranges:Advanced Patterns
Dynamic configuration: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