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