[FieldTrip] About preprocessing and define trial

Eelke Spaak eelke.spaak at donders.ru.nl
Thu May 16 08:52:02 CEST 2013


Dear BeomJun,

What you describe is definitely possible. If you specify:

cfg = [];
cfg.dataset = 'dataset';
data = ft_preprocessing(cfg);

you will get one very big 'trial' in the data structure, representing
just all your data. In the step above, you can also specify filter
options.

After this step, you can segment your data into trials by using
ft_redefinetrial (rather than ft_definetrial). However, you still need
a trl matrix containing the trial definition. The easiest way to
obtain this is to still call ft_definetrial as you used to do:

cfg = [];
cfg.dataset = 'dataset';
cfg.trialdef.....
% all the trial definition options go here
cfgout = ft_definetrial(cfg);

and then just save the output trl matrix:

trl = cfgout.trl;

now you can call ft_redefinetrial:

cfg = [];
cfg.trl = trl;
data = ft_redefinetrial(cfg, data);

and your data will be segmented.

Hope this helps,
Best,

Eelke


On 16 May 2013 08:28, Beom Jun Min <mbj0310 at gmail.com> wrote:
>
> Dear all,
>
> Hello, my name is BJ Min from Korea.
>
> I am just a beginner in the Fieldtrip.
> Anyway, with the help of tutorials, I could make grand average ERP of my
> data finally.
>
> However, my question is about the order of preprocessing. According to the
> tutorials, and examples, it looks the ft_definetrial step is the first, then
> ft_preprocessing step is followed.  But, is there any method to flip these
> two steps? What I want to do is preprocessing (filtering, notch filtering)
> first then to use ft_definetrial sequentially.
>
> Best regards
>
>
> BeomJun Min, M.D.
>
> Ph. D. student, Department of Medical System Engineering (DMSE)
> Gwangju Institute of Science and Technology (GIST)
> 261 Cheomdan-gwagiro(Oryong-dong), Buk-gu, Gwangju
> 500-712, Republic of Korea (South)
> Phone: +82-62-715-3266 / Fax: +82-62-715-3244
> E-mail: mbj0310 at gmail.com, http://bmssa.gist.ac.kr
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list