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

Uploaded Python 3

File details

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

File metadata

  • Download URL: meeg_utils-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 61bcc6a3b893e798346952320c0dcec448736af9e9458ba6c6109953af6345ca
MD5 5cb7f7f8bac369c55e3640b9a3d47843
BLAKE2b-256 dad82b6f3c0d44566993daa234fcd56d8da56eaeff711658a530a2f9ebbd1e17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meeg_utils-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cb116c8d943723d916fc868834495d5a28b777e6c2ebdcb4a5100793c61ba2e6
MD5 1e70039dda87c420c40757937bc0d654
BLAKE2b-256 9ae93574f974f421b0267dd22f53e4aeb7d7c4741503b68d73319346cbab40ca

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