[FieldTrip] Baseline correction when epoching after filtering
Emil Østergård Johansen
emilj at drcmr.dk
Tue Jun 28 14:33:41 CEST 2016
Dear Dr. Snijders,
Thank you for your swift response and suggestion. I tried your solution, but since my epochs are not completely adjacent in the data (there is a pause of 4 seconds between epochs), when following your suggestion there is no data available previous to the stimulus because the data in between has been removed when epoching using ft_redefinetrial. So when using a window of [-2 0], Fieldtrip simply reverts to subtracting the first sample value such that all signals start at 0, which is of course not desirable.
I have solved it now and will describe it briefly here if others face the same problem:
I included data prior to the stimulus onset in the epoch. As an example, say my epoch is 1 second long and I want to use [-0.5 0] as baseline. Then I define my epoch as [-0.5 1] and use ft_redefinetrial to epoch the data. Afterwards I use a cfg.baselinewindow = [0 0.5] and baseline correct the data the way you described. When plotting the ERP’s I then plot the true epoch which is [0.5 1.5] in my “dummy” epoch.
Thank you again for your help,
Emil
More information about the fieldtrip
mailing list