Skip to main content

hdeeg-snpm (Python)

Permutation statistics for high-density EEG scalp topographies: a statistic per channel, threshold-free cluster enhancement (TFCE) and cluster correction over the channel-neighbour graph, and a max-statistic permutation null for family-wise error control.

This is the Python port of the MATLAB toolbox hdEEG-SnPM. The MATLAB toolbox is the reference: an analysis here counts as validated only once it reproduces the MATLAB statistic maps and corrected p-values on shared inputs using the same permutation indices.

Status: v0.6.0, beta. It reproduces the MATLAB toolbox on the parity fixtures (phases 1 to 3); the MATLAB toolbox stays the reference. Changes: CHANGELOG.md.

Piece State
Recording systems (EGI 256 HydroCel, Compumedics 257 Neuvo) ported; Compumedics checked against MATLAB on anova1, correlationP, pairedT, unpairedT
TFCE and cluster finding ported; equal to MATLAB on 206 stored maps
Paired, unpaired, one-sample t-tests; Pearson and Spearman correlation with covariates ported; reproduces MATLAB on 33 reference runs
Group designs: anova1, ancova, regression, rmanova, mixed2way ported; reproduces MATLAB on 8 reference runs (37 permutation loops)
Results file, Excel workbook, scalp maps, HTML report, snpm run written; Excel workbook matches MATLAB's numbers on 9 reference runs
TurtleWave neural_events.db reader written; density checked only in TurtleWave's environment (below)
Circular phase analyses: circ_phase_group, circ_phase_group_u2, circ_corrAngLinear ported in phase 2 (v0.2.0); reproduces MATLAB on 8 reference runs
Mixed linear model (mixedmodel), random intercept (1|Subject) only ported in phase 3 (v0.3.0); agrees with MATLAB on 6 reference runs within the fit tolerances (except a few permuted fits where MATLAB's optimiser stops short), correction exact
Window for TurtleWave databases (snpm gui): paired and unpaired t-tests, one-way ANOVA, correlations written (unreleased); MATLAB's App Designer GUI itself is not ported
Spectral-power folders, other random structures not ported

How agreement with MATLAB is checked, and where the two differ on purpose: docs/explanation/parity-with-matlab.md. All documentation: docs/README.md.

Install

pip install hdeeg-snpm

Use

snpm run examples/paired_t.toml

writes a results file, a summary, an Excel workbook and a self-contained HTML report. The example files are in this repository, under examples/. A [turtlewave] section in the configuration file runs an analysis straight from a folder of TurtleWave neural_events.db files (how). The same is available in a window: pip install "hdeeg-snpm[gui]", then snpm gui (how).

Install (development)

uv venv && uv pip install -e ".[dev,gui]"
.venv/bin/pytest -q

Event density from TurtleWave databases is computed by TurtleWave itself, so its tests are skipped in this environment. Before a release, run them in TurtleWave's environment from the repository root, with TurtleWave-hdEEG checked out beside this repository:

PYTHONPATH=src ../TurtleWave-hdEEG/.venv/bin/python -m pytest -q tests/test_turtlewave.py

Every test must pass with none skipped.

Metadata

Release files for hdEEG-SnPM 0.6.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 hdEEG-SnPM 0.6.0
File Size Uploaded Provenance Actions
hdeeg_snpm-0.6.0.tar.gz 1.5 MB With provenance Details for hdeeg_snpm-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hdEEG-SnPM 0.6.0
File Interpreter ABI Platform Actions
hdeeg_snpm-0.6.0-py3-none-any.whl Python 3 none any Details for hdeeg_snpm-0.6.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / hdeeg_snpm-0.6.0.tar.gz

Download URL hdeeg_snpm-0.6.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
dba10ab762057863798f0ba3c2af5eff4867871018cc8f8095c0d2f3bc2d7b30
BLAKE2b-256 checksum
How to use checksums
7e20576c904b50a4f179cbfa2e11126127b47844a1e1c6b417d1251f6d2c70c4
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 26, 2026.

Transparency log

Release files / hdeeg_snpm-0.6.0-py3-none-any.whl

Download URL hdeeg_snpm-0.6.0-py3-none-any.whl
Size 155.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73bef78d0c56510ae902f1ee4f34fc854f5d5bf668544b9c682671168568a2f1
BLAKE2b-256 checksum
How to use checksums
6dde5a29f2312cf38b950a266a652e005729a5de78a80d72d06f126e8d4358a5
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 26, 2026.

Transparency log

Security for hdEEG-SnPM 0.6.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hdeeg_snpm-0.6.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 26, 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.

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