Skip to main content

pybemobil

MoBI data loading, preprocessing, and visualization built on MNE-Python.

Structure

pybemobil/
├── io/                          # Data I/O
│   ├── xdf.py                   # XDFLoader: multimodal XDF loading, stream alignment
│   ├── alignment.py             # align_stream_to_timestamps (timestamp-aware interpolation)
│   ├── bids_export.py           # BIDS export wrappers around mne_bids
│   └── utils.py                 # I/O helpers
├── preproc/                     # Preprocessing
│   ├── preprocessing.py         # EEGPreprocessor: ZapLine -> bad ch -> filter -> ASR -> ICA pipeline
│   ├── epoching.py              # EpochPreparer, stimulus renaming helpers
│   ├── motion.py                # Rigid body kinematics (find, process, split)
│   └── utils.py                 # ASR, ZapLine, ICA, dipole fitting, provenance, misc
├── viz/                         # Visualization
│   ├── plotting.py              # ERP, PSD, and component plots
│   └── utils.py                 # Plot helpers
├── examples/                    # Runnable example scripts
│   ├── preprocessing.py         # Full EEG preprocessing walkthrough
│   ├── plotting.py               # Visualization walkthrough (run preprocessing.py first)
│   ├── xdf_loading.py           # XDF multimodal loading
│   ├── motion_processing.py     # Rigid body kinematics
│   └── bids_export_example.py   # BIDS export
└── data/
    └── montages/                # EEG electrode montage files (.elc, .fif)

Modules

io - Load XDF multimodal recordings into MNE Raw objects, align auxiliary streams (ECG, gaze, EMG, EDA) to a common time grid, and export datasets to BIDS.

preproc - Full EEG preprocessing pipeline (bandpass, bad channel detection, ASR, ICA, dipole fitting), epoch preparation, and rigid body motion capture kinematics.

viz - ERP and PSD plotting utilities built on MNE and matplotlib.

examples - Self-contained scripts demonstrating major features. Run directly or open as notebooks (percent-format cells).

Installation

Install the latest release from PyPI:

pip install pybemobil

To also install the JAX-accelerated AMICA backend (the default ICA method, which falls back to Picard when this is missing):

pip install "pybemobil[jamica]"

Alternatively:

  • Latest development version from GitHub:

    pip install git+https://github.com/BeMoBIL/pybemobil.git
    
  • From source, in editable mode (for development):

    git clone https://github.com/BeMoBIL/pybemobil.git
    cd pybemobil
    pip install -e ".[dev]"
    

We recommend installing into a fresh environment, e.g. conda create -n pybemobil python=3.12.

Quick start

from pybemobil.io import XDFLoader
from pybemobil.preproc import EEGPreprocessor, find_rigid_bodies

# Load a multimodal XDF recording
loader = XDFLoader(montage="easycap-M1")  # or a path to your .elc/.fif
recording = loader.load("sub-01_task-walk_run-01.xdf")
raw = recording.raw

See examples/ for complete worked examples:

Feature Example script
XDF multimodal loading examples/xdf_loading.py
EEG preprocessing pipeline examples/preprocessing.py
Visualization (run preprocessing.py first) examples/plotting.py
Rigid body kinematics examples/motion_processing.py
BIDS export examples/bids_export_example.py

Citing

If you use pybemobil in your work, please cite it. The "Cite this repository" button on GitHub (generated from CITATION.cff) gives the reference in APA and BibTeX format.

pybemobil is a Python implementation of the BeMoBIL pipeline, so please consider also citing:

Klug, M., Jeung, S., Wunderlich, A., Gehrke, L., Protzak, J., Djebbara, Z., Argubi-Wollesen, A., Wollesen, B., & Gramann, K. (2022). The BeMoBIL Pipeline for automated analyses of multimodal mobile brain and body imaging data. bioRxiv. https://doi.org/10.1101/2022.09.29.510051

License

pybemobil is released under the BSD 3-Clause License.

Contributing

Contributions are welcome! To report a bug or suggest a feature, please open an issue. For development setup, the pull request workflow, testing and releases, see CONTRIBUTING.md.

Metadata

Release files for pybemobil 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybemobil 0.1.0
File Size Uploaded Provenance
pybemobil-0.1.0.tar.gz 109.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pybemobil 0.1.0
File Interpreter ABI Platform
pybemobil-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 220.4 kB

Release files / pybemobil-0.1.0.tar.gz

Download URL pybemobil-0.1.0.tar.gz
Size 109.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e7157c9eb05beb4bfdb2428ff9be0e661af59645f00d2c9821d2e9461899319f
BLAKE2b-256 checksum
How to use checksums
600d3fcf1339ba7421cea517fd5f4776d47abb47f6ccec46b760f48b4abd5709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / pybemobil-0.1.0-py3-none-any.whl

Download URL pybemobil-0.1.0-py3-none-any.whl
Size 111.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9f52ef2c2684a0dbe375e1294b813b629e125161e898457f0ca8ce9a566eb44
BLAKE2b-256 checksum
How to use checksums
ff5cf2ac87a9a9831f6022e4cda63b1f7c3ace6f8607af8ecc8341c31b4ce7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for pybemobil 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pybemobil-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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