mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

read_raw_nirx fails with NIRStar 15.1 data: RuntimeError: MNE does not support this NIRStar version ("15.1")

Open allwaysFindFood opened this issue 5 months ago • 4 comments

Hello!

When attempting to read NIRx data recorded with ​NIRStar version 15.1, mne.io.read_raw_nirx() raises a runtime error:

RuntimeError: MNE does not support this NIRStar version ("15.1")

After inspection of the source code, the following code appears to be unsupported only for version 15.1

            if hdr["GeneralInfo"]["NIRStar"] not in ['"15.0"', '"15.2"', '"15.3"']:
                raise RuntimeError(
                    "MNE does not support this NIRStar version"
                    f" ({hdr['GeneralInfo']['NIRStar']})"
                )
Image

Want to know why and how to read data saved with ​NIRStar version 15.1

thx

allwaysFindFood avatar Jul 08 '25 07:07 allwaysFindFood

... for example you can see where we added support for nirstar 15.0 (previously we just had 15.2):

https://github.com/mne-tools/mne-python/pull/6986

To add official support it would be great to have a tiny dataset recorded from a 15.1 device that we could add to our testing dataset, and know the (few) channel names we should have etc.

larsoner avatar Jul 08 '25 15:07 larsoner

Sorry thought I posted above that -- I meant to say would it be possible for you to share a sample file from the system? 😄

larsoner avatar Jul 08 '25 15:07 larsoner

Thank you for your feedback. The data in my hands comes from a collaborating party and cannot be shared. I sincerely apologize. Through communication, the collaborating party claims that the data with version 15.1 is identical to that with version 15.0. I have doubts about this and will follow up to verify.

allwaysFindFood avatar Jul 09 '25 02:07 allwaysFindFood

If you change the check to allow version 15.1 do things seem to work okay?

larsoner avatar Jul 09 '25 11:07 larsoner