Analysing fNIRS in python

I’m currently planning my first fNIRS study on NIRx device. Was wondering if there’re any packages in Python which could be used for data preprocessing? NIRx recommends Homer3 for preprocessing & SPM for analysis, but I wonder if there are already any tools developed in Python I could try?

Thanks in advance!

There’s existing wrappers that break when directly used, from the fnirs github (GitHub - fNIRS/snirf: SNIRF Format Specification), at least with snirf files (I assume snirf is used here because of the mention of Homer3). However, you can easily open snirf files with h5py and follow the specifications as mentioned in that same github. (snirf/snirf_specification.md at master · fNIRS/snirf · GitHub)

There’s also MNE in python that might be admissible for analysis , but I haven’t tried that out myself extensively. The examples work well, but porting actual NIRS data to MNE isn’t something I’ve done.

1 Like