[Mne_analysis] Error while reading snirf data

Eric Larson larson.eric.d at gmail.com
Thu Sep 23 11:17:08 EDT 2021
Search archives:

        External Email - Use Caution        

This looks like a bug in the SNIRF writer (or maybe reader?), can you open
an issue here and ideally share a file (e.g., on Google Drive, DropBox,
etc.) that has this problem:

https://secure-web.cisco.com/1hOV5N875Pgwxn7gacm93IkO4Hg5qotdscOsnvUacNxWywIYO5t5GP6ruutqf0EYILREs2JoeKKwxx6hgmz4_kgVjTL0bD19aGIjgvMan6T9plPfR5-p4k0lL_448yrrWsxfQD2ldZKF0FkF_6ncynUfuqRbagVd7CCnuD6dzXJXfQodhKW9Uc5fmR3ucC_b9FgzrmcaUbmYOU-kfsfx7d-T1W9EYl8CrNeJsABzLtChiDPX9-Dz2C5oj6fEPwVMoW9TI6oZDMv1hABpOZs8g5Q/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-nirs%2Fissues%2Fnew%3Fassignees%3D%26labels%3DBUG%26template%3Dbug_report.md%26title%3D

Eric


On Wed, Sep 22, 2021 at 7:58 AM 郭垒 <guolei0812 at yeah.net> wrote:

>         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!
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1i9DAUNm1HbcuqBHHmydKZUAsKTZ2-TQwYizLoeLafuheoHBDItVX2DdPb7mE4VsPCEATrtzstouT47mYpiTd5pwtQ47vOM_vaJpAc8m6HEjK7Xb_eHh2vFnEFj2yB3k_NAFg3QF5W_7tB07q4utFnH3LSXjz7YaZSxnW0-OrAt1aiuX5rjfsoURThFKo6eBF1DFBB5Gc9b33YM567G-NiFV0MnM1iL7pM67e2tlh_24y0loV9tOh0RIEj2xABGvZBBg1EyVUStwVEdpSUsCREw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210923/c1854018/attachment.html 


More information about the Mne_analysis mailing list