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.2.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.2-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meeg_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 385.9 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.2.tar.gz
Algorithm Hash digest
SHA256 65cee3613ac1f4d61de98ef23e7bf277e15be1f9367e6a5357b2db03a747eb4f
MD5 827be7330533186d994977914ee6a349
BLAKE2b-256 37ec22cf4ba437a8949d266e501a3fd2d9cf73ac18b37a7c0e28c32e1b66826b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meeg_utils-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 278ab820fe5e8b8e94cd2410e8b4aa4162d9d0ab7d8cb5802a0bb53869d0358b
MD5 bd2853c8660990ac8c509cf549594f05
BLAKE2b-256 13b068f17e06acda2eec46a52f944ba5d1f8f5bcbeb2a75f4b1afbba9b818b6c

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