Skip to main content

AutoClean EEG

Python License Code style: black

A modular framework for automated EEG data processing, built on MNE-Python.

Features

  • Framework for automated EEG preprocessing with "lego block" modularity
  • Support for multiple EEG paradigms (ASSR, Chirp, MMN, Resting State)
  • BIDS-compatible data organization and comprehensive quality control
  • Extensible plugin system for file formats, montages, and event processing
  • Research-focused workflow: single file testing → parameter tuning → batch processing
  • Detailed output: logs, stage files, metadata, and quality control visualizations

Installation

pip install autoclean-eeg

For development installation:

git clone https://github.com/cincibrainlab/autoclean_pipeline.git
cd autoclean-eeg
uv tool install -e --upgrade ".[dev]"

Quick Start

AutoClean EEG offers two approaches for building custom EEG processing workflows:

Create simple Python files that combine configuration and processing logic:

# my_task.py
from typing import Any, Dict
from autoclean.core.task import Task

# Embedded configuration
config = {
    'resample_step': {'enabled': True, 'value': 250},
    'filtering': {'enabled': True, 'value': {'l_freq': 1, 'h_freq': 100}},
    'ICA': {'enabled': True, 'value': {'method': 'picard'}},
    'epoch_settings': {'enabled': True, 'value': {'tmin': -1, 'tmax': 1}}
}

class MyRestingTask(Task):
    def __init__(self, config: Dict[str, Any]):
        self.settings = globals()['config']
        super().__init__(config)
    
    def run(self) -> None:
        self.import_raw()
        self.run_basic_steps(export=True)
        self.run_ica(export=True)
        self.create_regular_epochs(export=True)
# Use your custom task
from autoclean import Pipeline

pipeline = Pipeline(output_dir="/path/to/output")
pipeline.add_task("my_task.py")
pipeline.process_file("/path/to/data.raw", task="MyRestingTask")

Option 2: Traditional YAML Configuration

For complex workflows or when you prefer separate config files:

from autoclean import Pipeline

# Initialize pipeline with YAML configuration
pipeline = Pipeline(
    output_dir="/path/to/output"
)

# Process using built-in tasks
pipeline.process_file(
    file_path="/path/to/test_data.raw", 
    task="rest_eyesopen"
)

Typical Research Workflow

  1. Test single file to validate task and tune parameters
  2. Review results in output directories and adjust as needed
  3. Process full dataset using batch processing
# Batch processing (works with both approaches)
pipeline.process_directory(
    directory="/path/to/dataset",
    task="MyRestingTask",  # or built-in task name
    pattern="*.raw"
)

Key Benefits of Python Task Files:

  • Simpler: No separate YAML files to manage
  • Self-contained: Configuration and logic in one file
  • Flexible: Optional export=True parameters control file outputs
  • Intuitive: Pandas-like API with sensible defaults

Documentation

Full documentation is available at https://cincibrainlab.github.io/autoclean_pipeline/

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use this software in your research, please cite:

@software{autoclean_eeg,
  author = {Gammoh, Gavin, Pedapati, Ernest, and Grace Westerkamp},
  title = {AutoClean EEG: Automated EEG Processing Pipeline},
  year = {2024},
  publisher = {GitHub},
  url = {[https://github.com/yourusername/autoclean-eeg](https://github.com/cincibrainlab/autoclean_pipeline/)}
}

Acknowledgments

  • Cincinnati Children's Hospital Medical Center
  • Built with MNE-Python

Metadata

Release files for autoclean-eeg 2.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autoclean-eeg 2.0.4
File Size Uploaded Provenance
autoclean_eeg-2.0.4.tar.gz 339.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for autoclean-eeg 2.0.4
File Interpreter ABI Platform
autoclean_eeg-2.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 612.1 kB

Release files / autoclean_eeg-2.0.4.tar.gz

Download URL autoclean_eeg-2.0.4.tar.gz
Size 339.3 kB
Tags Source
SHA-256 checksum
How to use checksums
37c6e0e1af3728ca171cfa510e4a0bb3c5c60a69bdc1fc9a24de9acacc933f7d
BLAKE2b-256 checksum
How to use checksums
a37acc8e4ed4dc3519d78be8961145725ac076baddddba5c6352a706b0f14664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.2

Release files / autoclean_eeg-2.0.4-py3-none-any.whl

Download URL autoclean_eeg-2.0.4-py3-none-any.whl
Size 272.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8014686916afa543de92ae639659983a69bd79283c258ebcc9d1d8f45e53e7d
BLAKE2b-256 checksum
How to use checksums
b7db6879912ef802d2c1b336d53b53339e5cf9a2d42a83b8e9b434519a247235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.2

Security for autoclean-eeg 2.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page