NIRSPY — NIRS Processing in Python
GUI-first, fNIRS-focused pipeline builder in Python. Runs locally in your browser. Wraps MNE-NIRS so every pipeline remains reproducible and inspectable.
Status
Pre-alpha — v0.1.0 in progress. Core pipeline engine, preprocessing,
quality control, and HRF block-average blocks are implemented and exercised
by 280+ tests. The CLI (nirspy run, nirspy serve) works end-to-end. The
Dash GUI foundation is in place; the visual block builder ships in the next
sub-release. See docs/roadmap.md for the full plan.
Why
Researchers who need a GUI for fNIRS today rely on Homer3, which requires a paid MATLAB license. The Python ecosystem already has excellent libraries — MNE-NIRS, Cedalion, pysnirf2 — but every one of them assumes the user can program.
NIRSPY fills that gap: a GUI-first, open-source (BSD-3) tool with reproducible YAML pipelines, running locally in the browser via Dash.
Features (v0.1)
- Linear, modular pipeline builder (drag-and-drop, coming in 5B)
- Optical-density conversion + modified Beer–Lambert law
- Bandpass filtering (configurable cutoffs)
- Automated quality control: Scalp Coupling Index + channel pruning
- HRF Block Average across conditions
- Probe / montage visualization (planned for 5C)
- Save and reload pipelines as YAML (round-trip stable)
.nirs ↔ .snirfconverter
Architecture details: docs/architecture.md.
Installation
NIRSPY is not yet on PyPI. Install from source:
git clone https://github.com/BrunoFurlanetto/nirspy.git
cd nirspy
python -m venv .venv
source .venv/bin/activate # PowerShell: .venv\Scripts\Activate.ps1
pip install -e ".[dev]"
Once installed:
nirspy --version
nirspy serve # GUI on http://127.0.0.1:8050
nirspy run pipeline.yml --input data.snirf --output result.snirf
Development
pytest # 280+ tests, ~5 s on a laptop
ruff check . # lint
mypy src/nirspy # type check (strict)
The Python 3.10 / 3.11 / 3.12 matrix runs on every PR via GitHub Actions.
Architecture
Three layers with strictly one-directional dependencies:
domain/— pure types (Pipeline,Block,DataType). No UI / MNE imports.engine/— thin adapter over MNE-NIRS, plus the cache layer.gui/— the Dash application.
Pipelines are persisted as YAML and treated as a public API: a breaking schema change bumps the minor version and ships an ADR.
Contributing
Read CONTRIBUTING.md and the Code of Conduct
first. Bug reports and feature requests use the
issue templates.
Security
Found a vulnerability? Do not open a public issue. Use the private security advisory flow.
License
BSD-3-Clause — same license as MNE-NIRS. Third-party license
notices live in third_party/licenses/.
Acknowledgements
Built on top of MNE-NIRS and MNE-Python.
Metadata
Release files for nirspy 0.3.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 | Provenance | Actions |
|---|---|---|---|---|
| nirspy-0.3.0.tar.gz | 194.1 kB | With provenance | Details for nirspy-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nirspy-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for nirspy-0.3.0-py3-none-any.whl |
Total release size: 335.9 kB
Release files / nirspy-0.3.0.tar.gz
| Download URL | nirspy-0.3.0.tar.gz |
|---|---|
| Size | 194.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35b4c7fcdc78775745380a8ad0f168d843590032fd0f3c1e4d16bbf05c0140ca
|
|
BLAKE2b-256 checksum How to use checksums |
85a232b82a49d32ca0aa7247d60dc43f3a2a1c2d65c593e658dc656c82e42a8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 24, 2026.
Transparency logRelease files / nirspy-0.3.0-py3-none-any.whl
| Download URL | nirspy-0.3.0-py3-none-any.whl |
|---|---|
| Size | 141.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56da644d79eec6f42055d010544ae2281d3d432c2919b1209cc62599b8f53be4
|
|
BLAKE2b-256 checksum How to use checksums |
5d2731c7595ff0dd517992f9abe04843a632ddd6c424dc38cd90e4ce5b2519d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 24, 2026.
Transparency logSecurity for nirspy 0.3.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.
Attestation for nirspy-0.3.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 May 24, 2026.
Transparency logA 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.