This release is a pre-release and may not be stable for production use.
fNIRSAtlas
fNIRSAtlas is a Python package for parsing, preprocessing, and classifying fNIRS datasets with a unified, extensible structure. It provides the largest fNIRS benchmark, covering motor, mental arithmetic, motor imagery, emotion, and other tasks, and a fully automatic pipeline from raw data to classification.
Features
- 20+ public fNIRS datasets
- Mental arithmetic, motor, n-back, and emotion classification paradigms
- Within-session, cross-session, and cross-subject evaluation
- YAML and Python pipelines for scikit-learn, PyTorch, and Braindecode
- Dataset caching, result persistence, statistics, and plots
- Export of fNIRS data in a consistent format
Usage
Installation
Requires Python 3.11 or later and uv. From the repository root:
uv sync
uv sync --extra dl # native PyTorch models
uv sync --extra braindecode # Braindecode models
Run a benchmark
from moabb.evaluations import CrossSubjectEvaluation
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from fnirsatlas import Bnci2014FnirsMA, FNIRSClassification, WindowedFeatureExtractor
evaluation = CrossSubjectEvaluation(
paradigm=FNIRSClassification(), datasets=[Bnci2014FnirsMA()]
)
pipeline = make_pipeline(
WindowedFeatureExtractor(),
StandardScaler(),
LinearDiscriminantAnalysis(shrinkage="auto", solver="lsqr"),
)
results = evaluation.process({"LDA": pipeline})
Evaluations accept scikit-learn-compatible pipelines. Data is downloaded and cached on first use. Raw results are stored in results/ and summaries in benchmark/. Existing runs are resumed unless overwrite=True is passed to the evaluation. See Benchmarking for more options.
Access data
import fnirsatlas
fnirsatlas.list_datasets() # available dataset names
dataset = fnirsatlas.get_dataset("Bnci2014FnirsMA")
X, labels, metadata = fnirsatlas.FNIRSClassification().get_data(dataset, subjects=[1])
See Data access for continuous and epoched output options.
Examples
See the runnable examples.
Documentation
See the documentation.
Contributing
See Contributing for the development setup, tests, and checks. In short:
- Open an issue to report a bug, suggest an improvement, request a feature or dataset, report a dataset correction, or ask a question.
- Open a pull request for a fix or feature.
- Add a dataset through a pull request.
Citation
@inproceedings{makela2026fnirsatlas,
title = {{fNIRSAtlas}: A Large-Scale Benchmark for Functional Near-Infrared Spectroscopy Classification},
author = {M{\"a}kel{\"a}, Kalle and Ruotsalo, Tuukka},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
eprint = {2611.10082},
archivePrefix = {arXiv}
}
Metadata
Release files for fnirsatlas 2.0.0a1
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 |
|---|---|---|---|---|
| fnirsatlas-2.0.0a1.tar.gz | 428.4 kB | Without provenance | Details for fnirsatlas-2.0.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fnirsatlas-2.0.0a1-py3-none-any.whl | Python 3 | none | any | Details for fnirsatlas-2.0.0a1-py3-none-any.whl |
Total release size: 577.3 kB
Release files / fnirsatlas-2.0.0a1.tar.gz
| Download URL | fnirsatlas-2.0.0a1.tar.gz |
|---|---|
| Size | 428.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfadc45bd064678c5397bfde0d87565be0460ecdbadaeed55c553459f1c7b8b6
|
|
BLAKE2b-256 checksum How to use checksums |
a4f0eca492883cfa5c4ea0fae60bd51818576d1a3847c3338dacbad81040239d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / fnirsatlas-2.0.0a1-py3-none-any.whl
| Download URL | fnirsatlas-2.0.0a1-py3-none-any.whl |
|---|---|
| Size | 148.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
132ce56f5eb0798e8abcafa461c9cd90dbb7fb70987b132147f82aadf2667828
|
|
BLAKE2b-256 checksum How to use checksums |
41e3cfa9de70149e59c6bdbf2d3448b963dc4d6ccb2b2fc479cab0d5297af5dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for fnirsatlas 2.0.0a1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.