GUI fNIRS-first em Python — builder modular de pipeline sobre MNE-NIRS
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nirspy-0.2.0.tar.gz.
File metadata
- Download URL: nirspy-0.2.0.tar.gz
- Upload date:
- Size: 151.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87fa48359d427950994771cce25c339c2987e1853b6a83edfd2c94542f82b434
|
|
| MD5 |
33ef6a07f8fd1bc634dd1ececb3b3069
|
|
| BLAKE2b-256 |
b8d164828159a874d260e9d20c5dcb45357f07746cd606f45697705a28d490c7
|
Provenance
The following attestation bundles were made for nirspy-0.2.0.tar.gz:
Publisher:
ci.yml on BrunoFurlanetto/nirspy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nirspy-0.2.0.tar.gz -
Subject digest:
87fa48359d427950994771cce25c339c2987e1853b6a83edfd2c94542f82b434 - Sigstore transparency entry: 1608673631
- Sigstore integration time:
-
Permalink:
BrunoFurlanetto/nirspy@4e13febf5c37795cc71b6c567ba795bd0d363c1d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/BrunoFurlanetto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4e13febf5c37795cc71b6c567ba795bd0d363c1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file nirspy-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nirspy-0.2.0-py3-none-any.whl
- Upload date:
- Size: 110.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e59569040947994da7f6353c6f925b5fb430846b0effca298da0e9f9a43b5132
|
|
| MD5 |
7b4450b996ea090ef397e9b5d6f59eb1
|
|
| BLAKE2b-256 |
965aad16e34452c0ddd3274d8556fb7719b3b7708a6cdec36236b80842174ee9
|
Provenance
The following attestation bundles were made for nirspy-0.2.0-py3-none-any.whl:
Publisher:
ci.yml on BrunoFurlanetto/nirspy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nirspy-0.2.0-py3-none-any.whl -
Subject digest:
e59569040947994da7f6353c6f925b5fb430846b0effca298da0e9f9a43b5132 - Sigstore transparency entry: 1608673691
- Sigstore integration time:
-
Permalink:
BrunoFurlanetto/nirspy@4e13febf5c37795cc71b6c567ba795bd0d363c1d -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/BrunoFurlanetto
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@4e13febf5c37795cc71b6c567ba795bd0d363c1d -
Trigger Event:
push
-
Statement type: