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

Uploaded Python 3

File details

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

File metadata

  • Download URL: meeg_utils-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 91646239bcbe05ede0a0dafb4509fa5cc91583a4746ba537ec58ad2336e614a3
MD5 3985d920144ecacf4701e4beb04ee076
BLAKE2b-256 a86b3c97c74746b1f40d8107f0ff79d5651d9408c91c8a1e3b25c2cf71e713f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meeg_utils-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a0fb7a76a7753088e0dc1b068920795b017c5fb9553bc816afd57b257077e680
MD5 9224994325fa37dd4b26457a8642ff5a
BLAKE2b-256 beda2a09611c03b3778214e57dddb658be651c8151e879753322a29b8fec77c4

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