- MNE version: 1.2
- operating system: Windows 11
Hi, I am following the mne-nirs tutorial Group Level Waveform Analysis everything worked perfectly, however I am having troubles viewing the average waveform:
I did the following:
pprint(all_evokeds)
""" output: pprint(all_evokeds)
defaultdict(<class 'list'>,
{'NV': [<Evoked | '' (average, N=0), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB>,
<Evoked | 'NV' (average, N=10), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB>,
<Evoked | '' (average, N=0), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB>,
<Evoked | 'NV' (average, N=10), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB>,
<Evoked | 'NV' (average, N=10), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB>,
...
"""
fig, axes = plt.subplots(nrows=1, ncols=len(all_evokeds), figsize=(17, 5))
lims = dict(hbo=[-8, 20], hbr=[-8, 20])
for (pick, color) in zip(['hbo', 'hbr'], ['r', 'b']):
for idx, evoked in enumerate(all_evokeds):
mne.viz.plot_compare_evokeds({evoked: all_evokeds[evoked]}, combine='mean',
picks=pick, axes=axes[idx], show=False,
colors=[color], legend=False, ylim=lims, ci=0.95,
show_sensors=idx == 2)
axes[idx].set_title('{}'.format(evoked))
axes[0].legend(["Oxyhaemoglobin", "Deoxyhaemoglobin"])
And received the following traceback:
ValueError: <Evoked | '' (average, N=0), -8 β 20 sec, baseline -8 β 0 sec, 88 ch, ~294 kB> and <Evoked | 'NV' (average, N=10), -8 β 20 sec, baseline -8 β 0 sec, 86 ch, ~288 kB> do not contain the same channels.
How can I avoid this and be able to plot the average waveform!
Thank you in advance!
Best - Rebecka