[Mne_analysis] Error while reading snirf data
郭垒
guolei0812 at yeah.net
Wed Sep 22 07:26:50 EDT 2021
External Email - Use Caution
Dear everyone!
I am trying to use the mne_nirs module to process my fNIRS data. My device is NIRx and it provides snirf output. However, when I use the function mne.io.read_raw_snirf( ), it threw a valueError. Here below is my error log:
data1 = mne.io.read_raw_snirf('./whu0001_001/whu0001_001.snirf',preload=True)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
c:\Users\GuoLei\Desktop\test_wtc\data_preprocess.py in
----> 7 data1 = mne.io.read_raw_snirf('./whu0001_001/whu0001_001.snirf',preload=True)
D:\Softwares\Anaconda3\envs\data_analysis\lib\site-packages\mne\io\snirf\_snirf.py in read_raw_snirf(fname, preload, verbose)
45 mne.io.Raw : Documentation of attribute and methods.
46 """
---> 47 return RawSNIRF(fname, preload, verbose)
48
49
<decorator-gen-250> in __init__(self, fname, preload, verbose)
D:\Softwares\Anaconda3\envs\data_analysis\lib\site-packages\mne\io\snirf\_snirf.py in __init__(self, fname, preload, verbose)
270 else:
271 extra_ps[f'EEG{len(extra_ps) + 1:03d}'] = diglocs[idx]
--> 272 info['dig'] = _make_dig_points(nasion=nasion, lpa=lpa, rpa=rpa,
273 hpi=hpi, dig_ch_pos=extra_ps,
274 coord_frame=_frame_to_str[
D:\Softwares\Anaconda3\envs\data_analysis\lib\site-packages\mne\io\_digitization.py in _make_dig_points(nasion, lpa, rpa, hpi, extra_points, dig_ch_pos, coord_frame)
375 lpa = np.asarray(lpa)
376 if lpa.shape != (3,):
--> 377 raise ValueError('LPA should have the shape (3,) instead of %s'
378 % (lpa.shape,))
379 dig.append({'r': lpa, 'ident': FIFF.FIFFV_POINT_LPA,
ValueError: LPA should have the shape (3,) instead of (4,)
---------------------------------------------------------------------------
I really have no idea what "LPA" is. I used this function before on another data set (recorded from the same device) and it worked well. Does anyone have a solution to this error? Thanks advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210922/602d70b9/attachment.html
More information about the Mne_analysis
mailing list