Home » Resources » Data Analysis » Data format and organization

Subscribe to the Newsletter

Click here to subscribe to the fNIRS newsletter and mailing list.
To unsubscribe, click here.

Latest Comments

Click here to see the latest comments and discussions about fNIRS2022 presentations

Just interested in latest general conference updates? Visit the bulletin board

Data format and organization

File Format: SNIRF

The Society for fNIRS has proposed SNIRF (Shared Near InfraRed File) to be adopted as the official file format for fNIRS (CW-, TD-, FD-), DCS, fluorescence and bioluminescence measurements and imaging.
SNIRF includes both data and metadata, and is a standard, open-source HDF5 (Hierarchical Data Format version 5) format with .snirf extension supported by many APIs in many languages (C, C++, MATLAB, Python, etc.).

Official specifications (release v1.0): https://github.com/fNIRS/snirf

SNIRF readers/writers:
– Homer 3 (MATLAB): https://github.com/BUNPC/Homer3/wiki/Standalone-SNIRF-loading-and-saving
– EasyH5 (MATLAB): https://github.com/fangq/easyh5
– JSNIRF (MATLAB): https://github.com/fangq/jsnirfy
– MNE (Python): https://mne.tools

NOTE: SNIRF allows to store multiple runs, but BIDS (see below) requires only one recording per file.

Dataset Sharing Format: BIDS

Brain Imaging Data Structure (BIDS) defines a hierarchical organization of neuroimaging and behavioral data that facilitates data sharing and streamlines data processing.

fNIRS-BIDS specifications (draft October 2021): https://tinyurl.com/yzt8ngty

Folder structure:

  • *_nirs.snirf: Single-subject, single-run SNIRF recording
  • *_nirs.json: Sidecar JSON-formatted metadata including task name, sampling frequency, number of channels, sources, detectors (required), headgear, manufacturer, source and detector types, atlas, short channels information (recommended)
  • *_events.tsv: Tabular file describing the experimental task onset, duration (required), type, response time, value, presentation software information (recommended). May be accompanied by a JSON data dictionary for describing all columns.
  • *_channels.tsv: Tabular file describing channel name, type, source, detector, wavelength, unit (required), sampling frequency, orientation, short channel, measured wavelength, etc. (optional).
  • *_optodes.tsv: Tabular file describing optode name, type, location (required), description, hardware type (optional)
  • *_coordsystem.json: JSON file specifying the fiducials, the location of anatomical landmarks, and the coordinate system and units in which the position of optodes and landmarks is expressed.

BIDS Converters and Utility Tools: multi-language applications for converting datasets to/from BIDS, performing quality assurance (QT-NIRS), etc. https://bids.neuroimaging.io/benefits.html

BIDS Validator: online or local JavaScript application that checks the compliance with the latest BIDS specification. https://bids-standard.github.io/bids-validator/

BIDS Apps: container for running analytical pipelines locally, in the cloud, or on HPC. http://fnirs-apps.org/overview/

BIDS Examples: https://tinyurl.com/ydotew8q

Data Sharing Platforms: