Skip to main content

MEGaNorm

Paper DOI Made with Python Python Documentation Status Last Commit Binder License: GPLv3 Zenodo DOI

MEGaNorm Logo

MEGaNorm

Normative modeling of EEG/MEG brain dynamics across populations and timescales.

MEGaNorm is a Python package that wraps MNE-Python and PCNToolkit functionalities for extracting functional imaging-derived phenotypes (f-IDPs) from large-scale EEG and MEG datasets, and then deriving their normative ranges. It allows researchers to analyze large MEG and EEG dataset using high-performance computing facilities, and then build, visualize, and analyze normative models of brain dynamics across individuals.

Overview


🚀 Features

  • Compatibility with MNE-Python, PCNToolkit, SpecParam libraries
  • Normative modeling of oscillatory brain activity
  • Using high performance capabilities on SLURM clusters
  • EEG and MEG support with BIDS integration
  • Ready for reproducible deployment with Docker

📦 Installation

Option 1: From PyPI (recommended)

This is the easiest way to get started if you just want to use the toolbox.

conda create --channel=conda-forge --strict-channel-priority --name meganorm python=3.12

conda activate meganorm

pip install meganorm

Option 2: Installl from the source files

# 1. Create and activate environment
conda create --channel=conda-forge --strict-channel-priority --name meganorm python=3.12

conda activate meganorm

# 2. Clone and install MEGaNorm
git clone https://github.com/ML4PNP/MEGaNorm.git
cd MEGaNorm/
pip install .

Option 3: Using Docker

We provide a pre-configured Docker environment with Jupyter Lab. You can either build the image locally or pull the latest version from Docker Hub.

Option A: Build the image locally

make build
make run

Option B: Pull the latest image from Docker Hub

make pull
make run

This mounts:

  • notebooks/ → for saving Jupyter notebooks
  • results/ → for analysis outputs
  • data/ → for raw/processed EEG/MEG data

Jupyter will open in your browser on http://localhost:8888


📒 Getting Started (under construction)

👉 documentation Early helpers are available at: https://meganorm.readthedocs.io. We are working hard to add more thorough documentations and tutorials and they will be available soon.

import meganorm

Explore examples in the notebooks/ folder.


🧚‍♂️ Testing (under construction)

Run unit tests using:

pytest tests/

🧠 Citing MEGaNorm

  • Citing the package (DOI: 10.5281/zenodo.15441320): You can download BibTeX and other citation formats directly from the Zenodo page: Zamanzadeh, M., Verduyn, Y., & Kia, S. M. (2025). MEGaNorm: a Python package for normative modeling on MEG and EEG data (v0.1.0). Zenodo.

  • Citing the paper (nature communication biology): Zamanzadeh, Mohammad, Ymke Verduyn, Augustijn de Boer, Tomas Ros, Thomas Wolfers, Richard Dinga, Marie Šafář Postma, Andre F. Marquand, Marijn van Wingerden, and Seyed Mostafa Kia. "Normative modeling of MEG brain oscillations across the human lifespan." Communications biology (2026).


🤝 Contributing

Contributions, issues and feature requests are welcome!

See CONTRIBUTING.md for more info.


📜 License

This project is licensed under the terms of the GNU General Public License v3.0 – see the LICENSE file for details.

Download files

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

Source Distribution

meganorm-0.2.0.tar.gz (148.8 kB view details)

Uploaded Source

Built Distribution

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

meganorm-0.2.0-py3-none-any.whl (152.9 kB view details)

Uploaded Python 3

File details

Details for the file meganorm-0.2.0.tar.gz.

File metadata

  • Download URL: meganorm-0.2.0.tar.gz
  • Upload date:
  • Size: 148.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for meganorm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2d4c732d64e02635c8436a66d10f1b1861b2ae8a050c3f3ba7e15ab4350d807
MD5 9b6fe80584d5d8cba27c4db3989e334b
BLAKE2b-256 3b353c1e6d6283515b0803f7590325530179f69f37364b61c0e56fae9d9a1c46

See more details on using hashes here.

File details

Details for the file meganorm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: meganorm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 152.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for meganorm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ab4a118440fa774ca09d1be65b60bb52ed24b2bb41806f97744b65904011d52
MD5 f976e42701a45e9d54eae69bc899de23
BLAKE2b-256 3016a1f2647cedaa8a152540ed5961e375dfc72c1d88f672ffaf85646bd5c5c0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page