[FieldTrip] Still Reading a Trigger Channel
Ivano Triggiani
ivano_triggiani at yahoo.it
Fri Mar 11 10:37:19 CET 2011
Dear Eelke,
thanks for the aswer. but I'm not sure what does it mean for 'value' ? Value of
what? Order of comparison, value of voltage of wave, or what?
I have this trigger channel and I have 120 triggers... I want to evaluate my
EEG 2 seconds prestim, 2 seconds poststim for every trigger!
And when I use eventtype "TRIGGER" (yes, it is labelled so), It ask me for a
trialfun... and told me it have found 201 events (they were just 120...)
Ivano
-------------------------------------------------------
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110311/eb4f62b1/attachment.html>
More information about the fieldtrip
mailing list