Skip to main content

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.

CI License: BSD-3-Clause Python: 3.10+ Status: pre-alpha

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 ↔ .snirf converter

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nirspy-0.0.1.tar.gz (121.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nirspy-0.0.1-py3-none-any.whl (97.1 kB view details)

Uploaded Python 3

File details

Details for the file nirspy-0.0.1.tar.gz.

File metadata

  • Download URL: nirspy-0.0.1.tar.gz
  • Upload date:
  • Size: 121.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nirspy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 36a6ec3ae2abb808effbafd7fec76915ae3eede7848b188903a9eaa3373dadcc
MD5 8a3d9727bc1619faadd0493f48090fc7
BLAKE2b-256 495ffee7bcb575d2d156b09674c19a4b535858656f2e35ea63da0315c8e60b7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirspy-0.0.1.tar.gz:

Publisher: ci.yml on BrunoFurlanetto/nirspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nirspy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nirspy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 97.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nirspy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1fe39b6febe6ecc1b913b156f96f6941bde1d73a639fbfda2b5f462acbde6f5
MD5 cdbf6a0e9d8a679dfe7bf09417ba6675
BLAKE2b-256 eff1035cecbb54007f063fd6ac9d51999e29e925ec852e34fd6517c0b48a05d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirspy-0.0.1-py3-none-any.whl:

Publisher: ci.yml on BrunoFurlanetto/nirspy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page