[Mne_analysis] Error nproj = np.sum((S / S[0]) > 1e-2) raised when applying projectors

Scheltienne Mathieu mathieu.scheltienne at epfl.ch
Tue Dec 8 04:05:45 EST 2020
Search archives:

        External Email - Use Caution        

Dear all,

I am using MNE for EEG analysis on my MacBook Pro on both mac OS and Windows (double boot).
Today, I could not apply projectors on Windows but I could on mac OS. The error raised on Windows is:

C:\Program Files\Python\Python38\lib\site-packages\mne\io\proj.py:641: RuntimeWarning: invalid value encountered in greater
    nproj = np.sum((S / S[0]) > 1e-2)

The error was raised when doing:

raw = mne.io.read_raw_fif(fname, preload=True)
raw.set_eeg_reference(ref_channels='average', projection=True) # CAR
eog_projs, _ = mne.preprocessing.compute_proj_eog(raw, n_grad=0, n_mag=0, n_eeg=1, reject=None,
                                                                                                  no_proj=True, n_jobs=1)
raw.add_proj(eog_projs)
raw.plot(scalings=DEFAULT_SCALINGS)

Note that using only one of the 2 projectors raises the same error; and using raw.apply_proj() does it as well.
Same file with same script on mac OS is working fine. Any idea for a solution?

Have a nice day,
Mathieu Scheltienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/8516bc3b/attachment-0001.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: piplist-macOS.txt
Url: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/8516bc3b/attachment-0002.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: piplist-windows.txt
Url: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/8516bc3b/attachment-0003.txt 


More information about the Mne_analysis mailing list