OpenDvM
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
Full documentation, including runnable tutorials with real output, is at open-dvm.readthedocs.io.
Installation
pip install open-dvm
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. For rendered versions with real output already included, see the hosted tutorials.
How they fit together:
- 00 uses synthetic, on-the-fly generated data with deliberately strong, guaranteed-significant effects -- a safe, fast playground for learning the plotting/statistics API before touching real data. Start here.
- 01 preprocesses raw EEG into the epoched format every other tutorial reads. It requires interactive ICA component selection, so it can't run headless -- but you can skip it entirely: every other tutorial auto-downloads an already-preprocessed example dataset the first time it runs.
- 02 through 09 all analyze that same example dataset (not different datasets per tutorial) -- each one just picks whichever subject best illustrates its particular analysis method, so you'll see
sj = 1in some andsj = 2in others. Each covers one analysis module (ERP, TFR, BDM, or CTF) end to end, so they can be read in any order once you've done 00.
| 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:
eeg/raw(raw EEG files --.bdf(BioSemi),.edf, BrainVision.vhdr, Neuroscan.cnt, or EEGLAB.set; pass the extension viaeeg_preprocessing_pipeline'sraw_extparameter, default'bdf')..bdf/.edfcarry trigger info on a dedicated stim channel;.vhdr/.cnt/.setrepresent it as annotations instead, so also passannotation_event_id(a dict mapping your file's annotation descriptions to the same integer codes your behavioral file uses -- seeRAW.select_events's docstring).behavioral/raw(raw behavior files,.csv)eye/raw(raw eye-tracking files, if available:.ascor.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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| open_dvm-0.2.0.tar.gz | 229.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| open_dvm-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 465.9 kB
Release files / open_dvm-0.2.0.tar.gz
| Download URL | open_dvm-0.2.0.tar.gz |
|---|---|
| Size | 229.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1576027bd886850c87b75df0679429ccd2c1df710d509346606312698ec41088
|
|
BLAKE2b-256 checksum How to use checksums |
ebc39be31233b06cdfbcde48ac6e97bf9720ddfb0a46d6ce67c542ef120285b6
|
| 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 25, 2026.
Transparency logRelease files / open_dvm-0.2.0-py3-none-any.whl
| Download URL | open_dvm-0.2.0-py3-none-any.whl |
|---|---|
| Size | 236.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a9ec5880a0063ffe65e61aff66ca4521d25c11f629500faff58bc1100cff834
|
|
BLAKE2b-256 checksum How to use checksums |
34e56d54cda35fbb3e4f34eb85fa2ea327b3f2d4e71c64e4e8d9cc9d71484990
|
| 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 25, 2026.
Transparency log