File Formats Supported by NIRx
NIRx Data Philosophy
At NIRx, our primary goal is to enable our neuroscientist researchers. In a field with many open source tools, we want to make sure our users can take full advantage of them by offering non-proprietary data formats and by supporting the most popular fNIRS data formats including open SNIRF format. Our aim is to enable the acquisition and processing of real raw data, how scientists like it.
NIRx Data File Formats
NIRx fNIRS systems include the NIRScout lab-based imager and the NIRSport2 mobile imager. The former is controlled by the NIRStar data acquisition software; the latter, by the Aurora data acquisition software. For each recording session, these data acquisition software will create a folder with multiple data files, as discussed below.
.nirs Files
The .nirs file format, popularized by the Homer2 analysis toolbox, has been in use for over a decade. It is a holistic NIRS data file in that includes time series, trigger and montage information that represent a single fNIRS recording. It is a MATLAB-based file – like a .mat file, a .nirs file can be loaded directly into and have its data accessed from a MATLAB workspace. Download a Matlab script to convert NIRStar data into the .nirs format here.*
SNIRF Files
Shared Near-Infrared Spectroscopy Format (SNIRF) is another holistic NIRS data file format. Released in 2019, it significantly improves upon the .nirs file with its efficient data storage structure and its universal file format that can be utilized independently of any single analysis platform such as MATLAB.
SNIRF files are HD5 files, which can accommodate hierarchical data organization of large amounts of data. SNIRF files are a particular instance of an HD5 file, where the layout was decided on by the fNIRS research community at large to facilitate data sharing. Learn more about the SNIRF data format here.*
*Aurora produces both SNIRF and .nirs files by default. NIRStar can produce .nirs files after being enabled in the application settings- contact support@nirx.net for details.
Native NIRx Files
In addition to .nirs and SNIRF files, a recording session with a NIRx device will produce various files specific to NIRx devices. Each file generally represents a single thing – for example, a wavelength file for raw data from one wavelength of light, or a trigger file for input triggers.
While the file types follow the same general pattern for both NIRStar and Aurora, the file formats are slightly different. The exact formats for each platform are documented in their respective User Manuals, available on the software section of the NIRx Support Site. General descriptions of a few key data files are given below.
Wavelength Files
A separate file for each wavelength of light recorded in raw light intensity units (V). These are space-delimited files with dimensions of (number of time points) by (number of channels). 2-Wavelength NIRx systems produce a .wl1 and .wl2 file; 4-Wavelength NIRx systems also produce .wl3 and .wl4 files.
Header File
This file details recording settings – e.g. number of optodes and channels, sampling frequency, etc.
Trigger Files
These files contain trigger (or timestamp) information, as they were received by the recording software. At a minimum they contain the time frame in which the trigger was received, and the value of the trigger.
Montage files
These files contain the 3D scalp-level optode coordinates and channel list for the recording’s montage. They include the NIRx .probeInfo.mat file and the digpts.txt file, popularized by the AtlasViewer program.
Accessory Data
Data from NIRx recording accessories, including short channels and accelerometers, are always included in with the rest of the fNIRS data in the .nirs, SNIRF and native NIRx files.
Lab Streaming Layer (LSL) – Real Time Data Streaming
Lab Streaming Layer (LSL) is a library of code that enables the real-time exchange of time series data between different computers, programs and devices. Common uses include synchronizing of data from multiple devices- e.g. EEG, fNIRS, eye trackers- and real-time analysis for BCI/neurofeedback experiments.
Both NIRStar and Aurora can stream data in real time via LSL with no additional hardware or software needed.
The streamed data include raw light-intensity data, as well as data converted into changes in oxy and deoxyhemoglobin. The exact format of the streamed data from each platform are documented in their respective User Manuals, available on the software section of the NIRx Support Site.
Analysis Software
Offline Analysis Platforms
Supported NIRx File Formats
*While by default NIRS-SPM can load in NIRx data collected with NIRStar, it is also possible to load in data that was collected with Aurora with some modifications. Contact support@nirx.net for details.
Note on NIRx support: Other than nirsLAB, all software listed in the table are developed and maintained by a third party. Whilst we will help you to load NIRx data into these tools, for specific questions about third-party software, we may direct you to the proper external resources and partners. Please send us any questions that you may have to support@nirx.net.
Real Time Analysis
The fNIRS data streamed by Aurora and NIRStar via LSL can be received by a multitude of programs. In order to analyze this data, these programs must incorporate montage information, receive triggers, and implement real-time fNIRS analysis algorithms. This functionality can be custom coded by the user in platforms such as Python, MATLAB or Unity. Alternatively, one could employ Turbo-Satori, a comprehensive real-time fNIRS analysis solution created by our partners at Brain Innovation. Connecting Turbo-Satori to NIRx data acquisition software and implementing advanced, real-time fNIRS analysis is as easy as the click of a button. Learn more about Turbo Satori here.
Neuroanatomical Analysis with fNIRS
Taking anatomy into account in fNIRS analysis is crucial in making fNIRS research more generalizable, impactful and reproducible.
Established brain atlases can help to give more context to group results. As of July 2020, montages created in NIRx’s NIRSite software can be based on the Adult ICBM-152 atlas or one of 3 infant atlases, from 0-8 months. Both Aurora and NIRStar store scalp level, 3D-coordinates of montages based on an atlas in the NIRx .probeInfo.mat file as well as the digpts.txt file, popularized by the AtlasViewer program.
To improve the specificity and reproducibility of subject-level results, the inclusion of digitized information- when the 3D fiducials and optode locations on a subject have been recorded- or structural MRI scans are needed. Montages can be registered with individual digitized information either in NIRSite or in one of the 3rd party software listed above. Structural MRI data can be utilized in NIRS Toolbox or AtlasViewer.
NIRS Toolbox
When NIRx data is loaded into the NIRS Toolbox with the loadNIRx function, it will automatically find the 3D coordinates in the probeInfo file. This allows the user to render 3D drawings of their probe and project their results onto the probe, as shown in the image on the right.
In addition to 3D probe renderings, NIRS Toolbox allows for anatomically driven region of interest (ROI) analysis and image reconstruction. Users can rely on the NIRx provided atlases or register montages based on individual digitization information or structural MRI scans in the Toolbox.
AtlasViewer
This tool uses the digpts.txt file for optode registration. Users may utilize the Colin27 or infant atlases provided by this program or include a structural MRI scan of their choice.
AtlasViewer can generate a sensitivity profile for a montage, as seen on the left. It can also implement image reconstruction when combined with results processed in Homer2.
AtlasViewer is clickable GUI, and thus doesn’t require any scripting as NIRS Toolbox does. It can be accessed by downloading Homer2. For more information about AtlasViewer, see this publication.