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.3.0.tar.gz (194.1 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.3.0-py3-none-any.whl (141.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nirspy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 35b4c7fcdc78775745380a8ad0f168d843590032fd0f3c1e4d16bbf05c0140ca
MD5 00f048508ba1c904eed0fec38ea2a272
BLAKE2b-256 85a232b82a49d32ca0aa7247d60dc43f3a2a1c2d65c593e658dc656c82e42a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirspy-0.3.0.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: nirspy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 141.8 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56da644d79eec6f42055d010544ae2281d3d432c2919b1209cc62599b8f53be4
MD5 d225711226210e71ae815c2d2462b227
BLAKE2b-256 5d2731c7595ff0dd517992f9abe04843a632ddd6c424dc38cd90e4ce5b2519d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nirspy-0.3.0-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