[FieldTrip] Reading a Trigger Channel

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Mar 10 09:44:54 CET 2011


Hi Ivano,

The cfg.trialdef.eventtype and cfg.trialdef.eventvalue are used by the
so-called "trialfun", a function that selects interesting pieces of
the data (i.e., trials). If you do not explicitly specify a trialfun
(with cfg.trialfun = 'mytrialfun'), ft_definetrial will by default use
'trialfun_general'. This default function looks in the channel
specified by cfg.trialdef.eventtype for values equal to the
cfg.trialdef.eventvalue you specified. So, in your case (assuming your
trigger channel is indeed labelled 'TRIGGER'), you would use something
like:

cfg.trialdef.eventtype = 'TRIGGER';
cfg.trialdef.eventvalue = 1; % (or whatever is the value in your
trigger channel that corresponds to the trigger you are interested in)

Note that you can get an overview of the event channels present in
your data, along with their possible values, by executing:

cfg = [];
cfg.trialdef.eventtype = '?';
cfg.dataset = 'mydataset.edf';
ft_definetrial(cfg);

Hope this helps.

Best,
Eelke

2011/3/9 Ivano Triggiani <ivano_triggiani at yahoo.it>:
> Hi,
>
> I'm a new user and I don't understand how to read from a specific channel my
> event. Basically I have a .edf file with 25 EEG channel (they are all
> sampled at the same f) and the 25th one is my TRIGGER (a simple square
> wave). What must I do to read from that channel ?
> What is my cfg.trialdef.eventtype ? And my cfg.trialdef.eventvalue?
> (I've read all documentation about it)
> Thanks a lot,
> Ivano
>
>
>
>
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



More information about the fieldtrip mailing list