Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNIRF file generated by OBELAB software. #536

Open
mehshankhan opened this issue Feb 8, 2024 · 0 comments
Open

SNIRF file generated by OBELAB software. #536

mehshankhan opened this issue Feb 8, 2024 · 0 comments

Comments

@mehshankhan
Copy link

mehshankhan commented Feb 8, 2024

i am using OBELAB device to acquire fNIRS data. It's processing tool has an option of generating file in SNIRF format. after converting the file in snirf format i am using mne to read data and got the error:

CODE:

import mne
snirf_file = 'Converted_p1.snirf'
raw = mne.io.read_raw_snirf(snirf_file)

ERROR:

Traceback (most recent call last):

  Cell In[2], line 7
    raw = mne.io.read_raw_snirf(snirf_file)

  File ~\anaconda3\envs\data\lib\site-packages\mne\io\snirf\_snirf.py:56 in read_raw_snirf
    return RawSNIRF(fname, optode_frame, preload, verbose)

  File <decorator-gen-180>:12 in __init__

  File ~\anaconda3\envs\data\lib\site-packages\mne\io\snirf\_snirf.py:372 in __init__
    lpa = diglocs[idx, :3]

IndexError: index 3 is out of bounds for axis 0 with size 3

I also validated the file using provided validator.

Code:

result = snirf.validateSnirf('Converted_p1.snirf')
assert result.is_valid()
result.display()

Result:

<snirf.pysnirf2.ValidationResult object at 0x000002C1228CAD40>

Found 3721 OK      (hidden)
Found 2061 INFO    (hidden)
Found 0 WARNING
Found 0 FATAL  

File is VALID

Any suggestion regarding this error is highly appreciated.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant