North
October 20, 2023, 10:04am
1
I used the sentence below to do baseline correction. However, the signal doesn’t change. Could anyone tell me why? Thanks.
tmin, tmax = -0.2, 1
epochs = mne.Epochs(raw, events, tmin=tmin, tmax=tmax)
epochs.plot(n_epochs=10, events=True)
epochs.average().apply_baseline((tmin,tmax))
epochs.plot(n_epochs=10, events=True)
Out[11]: <Evoked | ‘0.00 × 21 + 0.00 × 22 + 0.00 × 41 + 0.00 × 42 + 0.00 × 61 + 0.00 × 62 + 0.33 × 111 + 0.67 × 112 + 0.00 × 121 + 0.00 × 122’ (average, N=1), -0.2 – 1 s, baseline -0.2 – 1 s, 59 ch, ~604 kB>
richard
(Richard Höchenberger)
October 20, 2023, 10:13am
2
This creates an Evoked object, applies baseline correction to it, and discards the results since you don’t assign the result of epochs.average()
to a new variable.
Also, using the entire duration of the epochs as baseline doesn’t seem very logical to me… you may want to reconsider this.
Best wishes,
Richard
North
October 20, 2023, 10:55am
3
Thanks. But the problem is still unsolved.
I write:
bb = epochs.average()
cc = bb.apply_baseline()
and found no difference between bb and cc.
North
October 20, 2023, 11:02am
4
I tried
bb = epochs[1].average()
bb.plot()
cc = bb.apply_baseline((tmin, tmax))
cc.plot()
and I saw the difference finally. Thanks.