Installation#

NIRSPipe needs Python 3.11 or later and is installed from source:

git clone https://github.com/AU-CONNECT-Lab/NIRSPipe.git
cd NIRSPipe
pip install -e ".[dev]"

Every dependency below is required and is resolved by the install. Check it with:

nirspipe --version

bids-validator#

nirspipe, nirspipe-prep and nirspipe-qc check their BIDS input with bids-validator when it is installed, and carry on with a warning when it is not. It runs on Deno:

deno install -A -g -n bids-validator jsr:@bids/validator

GPU#

nirspipe-hyper and nirspipe-hyper-pairnull can run the wavelet transforms on an NVIDIA card with --device cuda (Running on a GPU). The optional extra installs cupy with the CUDA 12 libraries it needs, so no CUDA toolkit is required, only a driver for CUDA 12 or later:

pip install -e ".[gpu]"

Dependencies#

Package

Version

Role

mne

≥ 1.13

fNIRS signal processing

mne-nirs

≥ 0.7

fNIRS preprocessing, GLM

mne-bids

≥ 0.14

BIDS read and write

pybids

≥ 0.20

BIDS dataset querying

nilearn

≥ 0.11

GLM design matrix and fitting

statsmodels

≥ 0.14.2

The robust refit of --noise-model ar_irls, and every --p-correction

nibabel

≥ 5.2

Surface curvature for the brain renders

scipy

≥ 1.14

Filters, spectra

numpy

≥ 2.1

Numerics

pandas

≥ 2.2.2

Table I/O

h5py

≥ 3.11

SNIRF read and write

plotly

≥ 5.19

Interactive QC figures

pyvista

≥ 0.44.2

Off-screen 3D brain renders

matplotlib

≥ 3.9

Static QC panels

pillow

≥ 10.0

Stitches the rendered brain views side by side

jinja2

≥ 3.1

HTML report templates

joblib

≥ 1.3

Parallel --nprocs dispatch

threadpoolctl

≥ 3.2

Numeric threads per subject under --nprocs

PyWavelets

≥ 1.6

Wavelet motion correction

pycwt

≥ 0.5.0b0

Wavelet transform coherence for hyperscanning

bibtexparser

≥ 2.0.0b9

Methods citations

flask

≥ 3.0

GUI (nirspipe-gui) and rating viewers (nirspipe-rate)

tables (PyTables) is not among them. The package writes no HDF5 file of its own beyond SNIRF; install it yourself to call save() on a GLM object the Python API returned.

Building these docs#

The documentation is built with Sphinx. The usage page renders every command’s flags from its own parser, so the package has to be installed first:

pip install -e .
pip install -r docs/requirements.txt
python -m sphinx -E -b html docs docs/_build/site