[Mne_analysis] ERP plot_topomap NaN to integer error

Brunner, Clemens (clemens.brunner@uni-graz.at) clemens.brunner at uni-graz.at
Fri Jun 25 08:53:00 EDT 2021
Search archives:

        External Email - Use Caution        

Hi Rene!

Would you mind posting your question in our forum at https://secure-web.cisco.com/1xb3tJinsirXaqLWpvbm3u46qLjRKqoHIr56vMp-oh8opOF9rn2pkKQvvlPViZdtY1zAuq77J8F8iHRE12vE1Yeso2Wx1xNR41QKBf_KGl0lrMILIPot7OHPkhTDFA2boJg4YC5ckKW-5NhmLFUzZf85gh1ubLVKRue6QEWNWhba5qXRCpTEzhbzUzFFz6qXowGn3nNmt4e7lo1VDBvxS4Swt83BmBNT1BVkFcYUnKcnseDSKGeE5sCTrXpDiB8D_6-QuGUQYWuNBB4hRlMpKeQ/https%3A%2F%2Fmne.discourse.group%2F? There's a higher chance more people read your issue and you get an answer.

Thanks!
Clemens


> On 25.06.2021, at 14:43, Andrade Rey René <rene.andrade at edu.uah.es> wrote:
> 
>         External Email - Use Caution        
> 
> 
> Dear MNE experts:
> 
> I have one issue while computing an ERP topomap. I have tried plot_projs_topomap as well but always the same error. I thought it was an issue of the projections as 0 projections items are activated. I’m not sure. 
> 
> 
> Not setting metadata
> Not setting metadata
> 307 matching events found
> Setting baseline interval to [-0.30078125, 0.0] sec
> Applying baseline correction (mode: mean)
> 0 projection items activated
> Loading data for 307 events and 257 original time points ...
> 1 bad epochs dropped
> /Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py:570: RuntimeWarning: invalid value encountered in arcsin
>   angle = np.arcsin(distance / np.mean(radii))
> Traceback (most recent call last):
>   File "/Users/andraderenew/Dropbox/Aplicaciones/Mind_Monitor/others/postprocessing/erp_mne.py", line 57, in <module>
>     fig = rest_exp3.plot_topomap(times, average=0.05)
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/evoked.py", line 346, in plot_topomap
>     return plot_evoked_topomap(
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py", line 1666, in plot_evoked_topomap
>     tp, cn, interp = _plot_topomap(
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py", line 903, in _plot_topomap
>     extent, Xi, Yi, interp = _setup_interp(
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py", line 791, in _setup_interp
>     interp = _GridData(pos, extrapolate, clip_origin, clip_radius, border)
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py", line 602, in __init__
>     outer_pts, mask_pts, tri = _get_extra_points(
>   File "/Users/andraderenew/opt/anaconda3/envs/mne/lib/python3.8/site-packages/mne/viz/topomap.py", line 571, in _get_extra_points
>     n_pnts = max(12, int(np.round(2 * np.pi / angle)))
> ValueError: cannot convert float NaN to integer
> 
> 
> I use this code below. 
> 
> 
> exp3=mne.io.read_raw_edf('/Users/andraderenew/Dropbox/Aplicaciones/Mind_Monitor/others/postprocessing/exp3.edf', preload=True)
> exp3.filter(1,30, method='iir')
> events_exp3=mne.make_fixed_length_events(exp3, duration=1.0)
> exp3=exp3.copy().set_montage(ten_five)
> epochs_exp3 = mne.Epochs(exp3, events_exp3, event_id={'resting_state':1}, tmin=-0.3, tmax=0.7, preload=True)
> rest_exp3=epochs_exp3['resting_state'].average()
> fig_exp3=rest_exp3.plot(spatial_colors=True)
> rest_exp3.plot(gfp=True, spatial_colors=True, ylim=dict(eeg=[-12, 12]))
> times = np.linspace(0.05, 0.15, 5)
> fig = rest_exp3.plot_topomap(times, average=0.05)
> 
>  
> Thanks for all the help win advance!!
> 
> Best, 
> Rene Andrade. 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1WycrYQrFx97HcQXu3ZObEi6DDkZWcq_z1hz7edhVAUWXux0PFbq-nw_WFqWqUFJDfVJhq0PY1onbvqXgMHUN6hRIg_VMaP1NsB3HVhdS4WxTLq-ucg439wPk3cMsnkyWQSqvreAqfUX9yZpnyA8W7VN2PORn2T5-7k8eg_I8wdZ9_AlBaQT1gGUORkr4IOhF0-FhGPz6DpAJhuKzbhDMwP1Ea6hpHAiWmKzWEEtEBarkoEotaU06XZcvAIGzprK4WIEOtrplIYVo45RibjDKUw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis




More information about the Mne_analysis mailing list