Something Wrong in Trial Definition
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Tue Mar 18 22:10:04 CET 2008
Dear Li Weina
I am not sure what you mean with the function "ctf_read", as that is
not part of Fieldtrip.
If the data was acquired continuously, then I suggest that you use
read_fcdc_event and that you plot the value of each trial versus the
sample
event = read_fcdc_event(..)
sel = find(strcmp('backpanel trigger', {event.type});
event = sevent(sel);
x = cell2mat(event.sample);
y = cell2mat(event.value);
plot(x, y, '.')
that will show the structure in the sequence of the triggers in your
data.
It might well be that you have multiple triggers of value "9" in your
data within what you condider to be a single trial, or that some
trials do not have the tigger 9 in them. If the data was acquired
trial-based, then I suggest that you make your own trialfunction
(cfg.trialfun) that defines the segments of interest based on the
'trial' event (i.e. search for event(i).type='trial' and use event
(i).sample, duration and offset to define the begin, end and offset
of each segment of interest).
see "help definetrial" and e.g.
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:tutorial:preprocessing
and
http://www2.ru.nl/fcdonders/fieldtrip/doku.php?
id=fieldtrip:documentation:examples:making_your_own_trialfun_for_conditi
onal_trial_definition
best regards,
Robert
On 18 Mar 2008, at 8:24, 李卫娜 wrote:
> Hi, everyone,
>
> There was something wrong when I use the fieldtrip function
> 'definetrial', or exectly 'read_fcdc_event'.
> I first got the basic information of my data by using function
> 'ctf_read', and it returned data which was orgnized as <1800*185*75
> double>, that is , there were 75 trials in my data. But when I
> defined trial by using 'definetrial', (key parameters were
> configured as follows: cfg.trialdef.eventtype='frontpanel
> trigger' ; cfg.trialdef.prestim=1; cfg.trialdef.poststim=2;
> cfg.trialdef.eventvalue=9 %(obtained from 'read_fcdc_event'); ), it
> showed 88 trials were defined. What's more, I found the trials
> defined by 'definetrial' were not consecutive.
> SO, I want to know what' s wrong with the processing or the fucntion?
> Thank you for your answer!
> Best wishes.
>
>
> Li Weina
>
> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!
> ----------------------------------
>
> The aim of this list is to facilitate the discussion between users
> of the FieldTrip toolbox, to share experiences and to discuss new
> ideas for MEG and EEG analysis.
>
> http://listserv.surfnet.nl/archives/fieldtrip.html
>
> http://www.ru.nl/fcdonders/fieldtrip/
>
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/fcdonders/fieldtrip.
More information about the fieldtrip
mailing list