Skip to main content

OpenDvM

tests License Python

A comprehensive Python package for EEG, eye-tracking, and behavioral data analysis, built on top of MNE-Python. open_dvm covers the full pipeline from raw-data preprocessing through ERP analysis, time-frequency decomposition, multivariate decoding, and spatial encoding models -- especially suited to integrating EEG data with behavioral and/or eye-tracking experiments (e.g. via OpenSesame).

EEG analysis includes:

  • Semi-automatic preprocessing pipeline (filtering, ICA, artifact rejection)
  • ERP analysis
  • Time-frequency decomposition
  • Multivariate decoding (BDM)
  • Forward encoding / channel tuning function models (CTF)
  • Eye-tracking integration and quality control

Installation

open_dvm isn't published on PyPI yet. Install directly from GitHub:

pip install git+https://github.com/dvanmoorselaar/open_dvm.git

For development (editable install with test/lint dependencies):

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

Quick Start

from open_dvm.analysis import ERP
from open_dvm.support import FolderStructure

# Load preprocessed data
df, epochs = FolderStructure().load_processed_epochs(sj=1, fname='ses_01_main', preproc_name='main')

# Compute condition-specific ERPs
erp = ERP(sj=1, epochs=epochs, df=df, baseline=(-0.2, 0))
erp.condition_erps(pos_labels={'target_loc': [2, 6]})

Tutorials

The tutorials/ folder contains 10 Jupyter notebooks that walk through the toolbox end to end, from preprocessing to advanced decoding:

Notebook Description
00_visualization_and_statistics Tour of every plotting/statistics option in open_dvm.visualization.plot, using synthetic data with guaranteed-significant effects. Read this one first.
01_preprocessing EEG preprocessing pipeline: filtering, ICA, artifact rejection
02_erp_analysis Event-related potential (ERP) computation and visualization
03_tfr_analysis Time-frequency decomposition via Morlet wavelets
04_tfr_advanced Advanced TFR: wavelet parameters, alternative decompositions, group-level stats
05_bdm_decoding Multivariate decoding (BDM) basics: localizer/main-task decoding, cross-task generalization
06_bdm_advanced Advanced BDM: temporal generalization, classifier comparisons, time-frequency decoding
07_ctf_analysis Spatial channel tuning functions (CTF) via an inverted encoding model
08_ctf_advanced Advanced CTF: homogeneous ("ping") displays, subject-specific reference-location alignment
09_bdm_ctf_comparison BDM vs. CTF side by side on the same question -- decodability vs. interpretability

Folder Structure

Analyses are run from project-specific scripts, pointed at a project folder containing:

  1. eeg/raw (raw EEG files, .bdf or .edf)
  2. behavioral/raw (raw behavior files, .csv)
  3. eye/raw (raw eye-tracking files, if available: .asc or .csv)

For detailed file naming conventions and folder organization standards, see NAMING_CONVENTIONS.md.

Known Limitations

See KNOWN_LIMITATIONS.md for a list of known gaps, deferred features, and open methodological questions.

Contributing

Contributions are welcome -- see CONTRIBUTING.md for dev setup, running tests, and the PR process.

Citation

If you use open_dvm, please cite it via CITATION.cff (or GitHub's "Cite this repository" button). The accompanying methods paper is still in preparation; the citation entry will be updated with full details once it's available.

This toolbox is built on MNE-Python -- please also cite:

Gramfort, A., Luessi, M., Larson, E., Engemann, D. A., Strohmeier, D., Brodbeck, C., ... & Hämäläinen, M. S. (2014). MNE software for processing MEG and EEG data. Neuroimage, 86, 446-460.

Questions or Issues?

Please open a GitHub issue, or contact Dirk van Moorselaar at dirkvanmoorselaar@gmail.com.

Metadata

Release files for open-dvm 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 open-dvm 0.1.0
File Size Uploaded
open_dvm-0.1.0.tar.gz 225.4 kB Details

Built distribution (wheel)

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

Total release size: 459.2 kB

Release files / open_dvm-0.1.0.tar.gz

Download URL open_dvm-0.1.0.tar.gz
Size 225.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ac018bcb9436effb9156c3da5b0187834e3844947f7ce6360ab030382a028ec2
BLAKE2b-256 checksum
How to use checksums
0354fe50457b730f58782ac98ad451e0a3a5b6f07e626ff10b20f702a3ca9016
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 Aug 15, 2026.

Transparency log

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

Download URL open_dvm-0.1.0-py3-none-any.whl
Size 233.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2bc461b38af12169a9fc12ad5b3bc172182cbe01ab7fd11a15fbc6aa2a18604
BLAKE2b-256 checksum
How to use checksums
76b253c6424356331a740b89b3a74699cf20bc8da056021165591d2fde3d79b4
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 Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release 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