using fNIRS MNE with custom hardware

Hi,
I am testing an fNIRS system made using TI’s ADS1299.
I would really like to use the MNE processing functions for fNIRS listed here MNE fNIRS tutorial but it seems that the data has to be in a particular MNE format – is this right, or is there a way to use the library on a .txt or .csv file of the raw data?
If I need a particular format, how can I convert my data into the correct format for processing?
Thank you!

You could try reading the text file, manually defining the metadata (sampling rate, channel names, etc.) and create a raw arraywith mne.io.RawArray.
An example can be found here

1 Like

Hi,
Thank you for the link! I was able to create an an MNE instance using info = mne.create_info(ch_names=ch_names, ch_types=ch_types, sfreq=sfreq)
raw = mne.io.RawArray(raw_intensity, info, verbose=True)
but I keep getting the following error: RuntimeError: None must operate on continuous wave data, but none was found.
when I try to run: raw_od = mne.preprocessing.nirs.optical_density(raw)

also, how do I add information about source-detector distances to the mne raw array?