Convert to Snirf format


I am looking into BIDS formatting our fNIRS data. We have used a more clinically oriented device, NIRO-200NX, which provides the following measurements:
Tissue oxygenation index, TOI (%)
Normalized tissue hemoglobin index, nTHI (absolute value in arbitrary unit)
Oxygenated hemoglobin change, ∆O2Hb (μmol/L)
Deoxygenated hemoglobin change, ∆HHb (μmol/L)
Total hemoglobin change, ∆cHb (μmol/L)

Looking at the format spec of Snirf, I cannot find any correspondence among dataTypeLabels to the first two (TOI and nTHI). Am I missing something or are they simply outside of the scope of the format?

I just pinged some of the people who worked on BIDS NIRS because this is beyond my expertise but they may be able to help you.

Hi JF,

I’m excited to hear about data from another device type being converted to snirf and bids.

I haven’t used that device before or converted that data to SNIRF/BIDS. So I’ll Google the specs and get back to you in a day or so.

However, it seems like your query is more about SNIrF than BIDS. Can you please raise your question as an issue at the snirf repo too? That will get more fNIRS eyes on the question GitHub - fNIRS/snirf: SNIRF Format Specification


Many thanks to both of you!

You are right in that this is more of a snirf question. I will follow your advice and raise an issue at the repo too.


I have now done a first attempt at converting the data, though I had some difficulties with the snirf format. First, the tools (EasyH5, JSNIRF) provided in the official snirf repository do not create valid snirf files according to pysnirf2.
I resorted to using the low-level HDF5 functions in Matlab.

Even though the resulting files now pass pysnirf2 validation, I still have some difficulty using it with various tools. E.g. NIRS-Toolbox seems to expect the LandmarkPosXX dataset to be present, FieldTrip does not read string values (stim names) back as expected…

I wonder if there is something on my end or if this kind of data is highly unusual? Because of this, I hesitate to file more github issues. Instead, here is a link to an initial attempt at bids formatting data here, in the hopes that someone wants to have a look:

(The data includes events triggered by a TMS device.)

Any input is welcome!