[FieldTrip] Several trigger names at same position
Stephen Politzer-Ahles
spa268 at nyu.edu
Fri Jul 3 12:30:08 CEST 2015
Hello Mick,
You can go in and modify the 'trl' matrix created by ft_definetrial, so
that it only includes the events you want. For example, imagine the first
trial in your experiment has two simultaneous events, a '10' and a '2'; in
the trl matrix, the first row will have the event value 10 and the second
row will have the event value 2, but both rows will have the same latency.
So you can write a loop that goes through your trl matrix and makes the
appropriate adjustements to combine those rows---e.g., you could add the
two values together to create a new event value of '12', or concatenate
them to create '102', or whatever. After that, you can use the new trial
matrix as input to cfg.trl when you call ft_preprocessing(). See
http://www.fieldtriptoolbox.org/reference/ft_definetrial for an explanation
of the format of the trl matrix.
Best,
Steve
Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab
http://www.nyu.edu/projects/politzer-ahles/
> ------------------------------
>
> Message: 3
> Date: Thu, 2 Jul 2015 18:02:55 +0200
> From: Mick Lehmann <mick.lehmann at uzh.ch>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] Several trigger names at same position
> Message-ID: <C7F7FC91-FF32-4EFA-A879-A567ADC6A70A at uzh.ch>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Fieldtrippers,
>
> I?m using the script for reading data and I have a special issue at
> cfg.trialdef.eventvalue (see script below). The thing is that I have
> several triggers at the exact same position and I want to analyze only a
> subgroup of events which is defined by a combination of two trigggernames /
> evenvalues. Does anybody know how to define those trials, meaning how to
> create an event as a combination of two triggernames?
>
> This is how the script looks like:
> VP = dir('*.dat');
> cfg = [];
> cfg.dataset = (VP.name);
>
> cfg.trialdef.eventtype = 'Comment';
> cfg.trialdef.prestim = 2;
> cfg.trialdef.poststim = 6;
>
> cfg.trialdef.eventvalue = {'HitHitReakt? 'Cue_N3_neg'}; The events
> should be read only if both conditions are fulfilled
>
> cfg = ft_definetrial(cfg);
>
> cfg.demean = 'yes';
>
> dataHitHitReact = ft_preprocessing(cfg);
>
> dataHitHitReact = renamechannels(dataHitHitReact);
>
> save dataHitHitReact_preproc dataHitHitReact
>
> fprintf('%s not found.\n',cfg.trialdef.eventvalue{1})
>
>
>
> I'm deeply grateful for any help.
>
> Thanks,
> Mick
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150702/3125ef99/attachment-0001.html
> >
>
> ------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150703/cda51e51/attachment-0001.html>
More information about the fieldtrip
mailing list