Skip to main content

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

Project description

meeg-utils

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

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.4.tar.gz (387.8 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.4-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meeg_utils-0.1.4.tar.gz
  • Upload date:
  • Size: 387.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meeg_utils-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ffea25d1b8dfd8c6d7ef8edeb8b7f6681b3f7699d008287e8b1072bec2c73a5c
MD5 f2003afa5eeaac0c35fcd879772285c0
BLAKE2b-256 a105fd32c4fba62dad984635652607ae5ba9582676efe22b7c2a2bd3afe975d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meeg_utils-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for meeg_utils-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 58c80327f32a2cfcd3174f2d189f9859ac2e3e49189318110f5910dda7d01855
MD5 80a0234a1d0048a03c8e3288ff9993b8
BLAKE2b-256 83ae8b2d89aecac37b227108620f670b650846e59b53b6cf86002ae0bccbf138

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