Skip to main content

A Python-based MEEG processing toolkit primarily based on MNE-Python.

Project description

meeg-utils

CI Documentation codecov PyPI version Python 3.11+ License: MIT Code style: ruff

A Python-based MEG/EEG processing toolkit built on MNE-Python, providing a high-level, user-friendly API for processing MEG/EEG data.

Features

Preprocessing

Epoching In Progress

  • High-level PreprocessingPipeline class for streamlined MEG/EEG preprocessing. Pipeline Diagram

Feature Extraction

In Progress

  • Common MEG/EEG features (e.g., power spectral density, connectivity metrics).

📦 Installation

pip install meeg-utils

🚀 Quick Start

from meeg_utils.preprocessing import PreprocessingPipeline
from mne_bids import BIDSPath

# Create pipeline
pipeline = PreprocessingPipeline(
    input_path=BIDSPath(
        subject="01", session="01", task="rest",
        datatype="eeg", root="/data/bids"
    ),
    output_dir="/data/output"
)

# Run preprocessing
result = pipeline.run(
    filter_params={"highpass": 0.1, "lowpass": 100.0, "sfreq": 250.0},
    detect_bad_channels=True,
    remove_line_noise=True,
    apply_ica=True
)

# Save results
pipeline.save()

Batch processing:

from meeg_utils.preprocessing import BatchPreprocessingPipeline

# Process multiple subjects in parallel
batch = BatchPreprocessingPipeline(
    input_paths=bids_paths,  # List of BIDSPaths
    output_dir="/data/output",
    n_jobs=4  # Use 4 parallel workers
)

batch.run(detect_bad_channels=True, remove_line_noise=True, apply_ica=True)

📚 Documentation

Full documentation: https://colehank.github.io/meeg-utils/

🛠️ Development

# Clone and setup
git clone https://github.com/colehank/meeg-utils.git
cd meeg-utils
uv sync --dev
uv run pre-commit install

# Run tests
uv run pytest

# Build docs
cd docs && uv run make html

See the Contributing Guide for detailed development instructions.

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

Built on the excellent MNE-Python ecosystem.

📞 Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meeg_utils-0.1.0.tar.gz (385.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meeg_utils-0.1.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file meeg_utils-0.1.0.tar.gz.

File metadata

  • Download URL: meeg_utils-0.1.0.tar.gz
  • Upload date:
  • Size: 385.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for meeg_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c489b04ebd6a6154fdc80817c6104f4c9aa316de03f1fbaeb227044473fe90d3
MD5 142df0b1604aae46f682c484352bf648
BLAKE2b-256 d41366af361848c2b62c850cf4b38e70927184ee4096729c8b5fdc8c9ce8bb76

See more details on using hashes here.

File details

Details for the file meeg_utils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: meeg_utils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for meeg_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ef5907e2c1297b608ec5c9d6e5849ad777e9a0cf7d4f9d5d0d93b82ccdb9d7a
MD5 0effbe0bbd7ca1d002effa1ba84da94a
BLAKE2b-256 72ba98c673a5241de735fccaf19a83d3fe2a1b465c2e3b7fabf4ca5a47885bd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page