[FieldTrip] Trial-dependant baseline correction
Gio Piantoni
g.piantoni at nin.knaw.nl
Fri Mar 23 20:35:22 CET 2012
Hi Marco,
I don't understand very well if the bottleneck is the number of steps
or the memory/time used in preprocessing (a).
I think that the simplest approach is to use:
1) ft_definetrial (as in your (b))
2) ft_preprocessing (read data and apply preproc options)
3) ft_redefinetrial to take the window [-0.5 0.5] and change the
origin (you can do that in one step if you pass cfg.trl with three
columns: [begin_sample end_sample offset] in sample points)
Otherwise, if you're concerned about memory problems, you could do a
ft_definetrial and preprocessing for A events, and the same for B
events. Then, in Matlab, you average A events and subtract the average
from the B trials.
I think preprocessing on your trials should not take too much memory though.
HTH,
Gio
On Thu, Mar 22, 2012 at 13:13, Marco Dahmane <marco.dahmane at gmail.com> wrote:
> Dear fellow Fieldtrippers,
>
> I was having a small problem regarding baseline correction in FT.
>
> My situation is rather simple : I have two types of trials, trials A and
> trials B. Triggers A are always preceding triggers B, but the delay between
> the two is NOT fixed.
>
> I use triggers B to define my trials (for instance -0.5s to +0.5s).
> Very straightforward.
>
> However, I would like to use triggers A to define my baseline window. Say I
> would like to use the one second preceding each trigger A as the baseline
> for the following trial.
>
> Until now the way I was going about it was rather tedious :
> a) ft_preprocessing data as one big, long trial (filtering)
> b) ft_definetrial to define long trials as starting from trigger A (origin)
> to following trigger B (end)
> *c) ft_preprocessing to baseline correct*
> d) ft_redefinetrial with variable cfg.offset to set origin back to trigger B
> e) ft_redefinetrial to take only window [ -0.5s ; +0.5s]
>
> But I'm wondering whether that's not an overkill (especially since the delay
> between triggers A and B can be quite long and make the preprocessing really
> slow on my old machine).
>
> Any advice is appreciated,
>
> Best regards,
> Marco
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
More information about the fieldtrip
mailing list