Hello all,
I can’t quite figure out how to use ‘mne.combine_evoked’ to subtract two conditions.
I want to subtract CON-INC. And when I test this, Iam getting the same exact result independently of the order of the weights [1, -1] vs [-1, 1].
- CON-INC
evoked_diff = mne.combine_evoked([CON, INC], weights=[1, -1])
- INC-CON
evoked_diff = mne.combine_evoked([CON, INC], weights=[-1, 1])
I am getting the same exact output from both options. Does anyone know where I am going wrong?
For background, here are the code lines and plots:
CONGRUENT
CON_average
Out[106]: <Evoked | 'Grand average (n = 25)' (average, N=25), 0 – 1 sec, baseline off, 204 ch, ~6.6 MB>
fig1 = CON_average.plot_topomap(ch_type='grad', time_unit='s',times=times_plt, colorbar=True, vlim=(0,12), cmap=cmap_v, nrows=2, ncols='auto', contours=3)
INCONGRUENT
INC_average
Out[107]: <Evoked | 'Grand average (n = 25)' (average, N=25), 0 – 1 sec, baseline off, 204 ch, ~6.6 MB>
fig2 = INC_average.plot_topomap(ch_type='grad', time_unit='s',times=times_plt, colorbar=True, vlim=(0,12) , cmap=cmap_v, nrows=2, ncols='auto', contours=3)
CON-INC
evoked_diff_CONINC = mne.combine_evoked([CON_average, INC_average], weights=[1, -1])
Out[108]: <Evoked | 'Grand average (n = 25) - Grand average (n = 25)' (average, N=12.5), 0 – 1 sec, baseline off, 204 ch, ~6.6 MB>
fig3 = evoked_diff_CONINC.plot_topomap(ch_type='grad', time_unit='s',times=times_plt, colorbar=True, vlim=(0,16),cmap=cmap_v, nrows=2, ncols='auto', contours=3)
INC-CON
evoked_diff_INCCON = mne.combine_evoked([CON_average, INC_average], weights=[-1, 1])
Out[109]: <Evoked | '-Grand average (n = 25) + Grand average (n = 25)' (average, N=12.5), 0 – 1 sec, baseline off, 204 ch, ~6.6 MB>
fig1 = evoked_diff_INCCON.plot_topomap(ch_type='grad', time_unit='s',times=times_plt, colorbar=True, vlim=(0,16),cmap=cmap_v, nrows=2, ncols='auto', contours=3)
Many thanks!
Ana