Edit this page

NWB Workshops and Hackathons

:rewind: Back to the projects list

fNIRS neurodata type

Key Investigators

Project Description

Optical techniques for recording neural activity are gaining in popularity. Advances in techniques based on near infrared spectroscopy (NIRS) promise growth in user adoption and thus the need to store, share, and distribute data in a standardized format. In this project, we created a new NIRS neurodata type using the ndx-template. We anticipate that this extenstion will be generalizable to several formats of NIRS including, but not limited to, functional (fNIRS), time-domain (TD-fNIRS), frequency-domain (FD-fNIRS), and more. In addition, we formatted the NIRS extension such that raw NIRS data can be viewed using nwb-jupyter-widgets. We also created a prototype event-triggered average visualization tool.


  1. Objective A. Create a new fNIRS neurodata type using the ndx-template
  2. Objective B. Submit the new neurodata type to the NDX Catalog.
  3. Objective C. (stretch) Create an automated SNIRF –> fNIRS conversion tool.
  4. Objective D. (stretch) Create preliminary fNIRS data visualization tools.

Approach and Plan

  1. Explore the datasets listed here and determine the best one for prototyping first.
  2. Make a list of all fNIRS relevant neurodata structures and what lower level structures would be best to build on (e.g. time series vs. imaging time series).
  3. Submit the fNIRS neurodata type to the NWB repository.
  4. Formalize the conversion between SNIRF sample data and the new NWB_fNIRS neurodata type.
  5. Build a set of preliminary fNIRS data visualization tools.

Progress and Next Steps

In this project, we:

  1. Explored common data structures used to store and share fNIRS datasets
  2. Identified SNIRF as a well-documented starting point to identify required and optional data fields to replicate in NWB 2.0
  3. Mapped SNIRF data fields to NWB, creating a unified standard file specification mapping
  4. Created SNIRF data extraction tools that will form the basis of a future SNIRF -> NWB conversion tool (see Future work)
  5. Created a prototype NIRS ndx extension: github.com/agencyenterprise/ndx-nirs
  6. Verified the format of prototype extension was compatible with existing nwb widgets time series visualization

  7. Created a prototype event-triggered average time series visualization tool

Next steps:

  1. Complete the prototype NIRS ndx extension
  2. Update documentation related to the NIRS ndx extension
  3. Define & write tests for the extension using pytest
  4. Convene a working group with fNIRS experimental researchers to refine the NIRS ndx extension & update as necessary
  5. Publish our extension to the community, i.e. to the NDX Catalog.

Future work:

  1. Create an automated SNIRF -> NWB conversion tool & publish it to the community
  2. Finish the event-triggered average data visualization tool & submit a PR to github.com/NeurodataWithoutBorders/nwb-jupyter-widgets


  1. Jaeyoung et al. data is available at this link or wget http://doc.ml.tu-berlin.de/hBCI/NIRS/NIRS_01-29.zip for fNIRS data only
  2. Bak et al. data is available on figshare and analysis is available on github
  3. SNIRF sample data can be found here

Background and References

  1. Jaeyoung Shin, Alexander von Lühmann, Benjamin Blankertz, Do-Won Kim, Han-Jeong Hwang and Klaus-Robert Müller, “Open Access Dataset for EEG+NIRS Single-Trial Classification,” IEEE Trans. Neural Syst. Rehabil. Eng.
  2. Bak, SuJin, Jinwoo Park, Jaeyoung Shin, and Jichai Jeong. “Open-access fNIRS dataset for classification of unilateral finger-and foot-tapping.” Electronics 8, no. 12 (2019): 1486.