ft_definetrial

Fahimeh Mamashli mamashli at CBS.MPG.DE
Sat Nov 27 21:28:08 CET 2010


Hi again,
sorry I found out myself!
I discovered the problem. maybe it is interesting for others:
sometimes it seems routine ft_definetrial can not find all the events based on its default definition.
this is the routine way in ft_definetrail:

cfg34                         = [];
cfg34.dataset                 = '../rawdir/cp02a/cp02a4.fif';
cfg34.trialdef.eventtype      = 'STI101';
cfg34.trialdef.eventvalue     = 34; 
cfg34.trialdef.prestim        = 0.1;
cfg34.trialdef.poststim       = 0.6;

cfg34 = ft_definetrial(cfg34);

but I the problem is that, It could not detect all the events. so I did as follows to find all the event values:

hdr = ft_read_header('../rawdir/cp02a/cp02a1.fif');
[event] = ft_read_event('../rawdir/cp02a/cp02a1.fif','header',hdr,'detectflank','down');

cfg34                         = [];
cfg34.dataset                 = '../rawdir/cp02a/cp02a4.fif';

cfg34.event=event;

cfg34.trialdef.eventtype      = 'STI101';
cfg34.trialdef.eventvalue     = 34; 
cfg34.trialdef.prestim        = 0.1;
cfg34.trialdef.poststim       = 0.6;

cfg34 = ft_definetrial(cfg34);

the point is to change 'detectflank','down'! the default is 'up' and in my data it could not detect events.

because in default events I just had one event value '34'!! but after changing detectflank, it found 35!!

Best wishes,
Fahimeh 

------------------------
PhD student
Max Planck Institute for Human Cognitive and Brain Sciences
Stephanstraße 1A 
04103 Leipzig
Germany

Tel: +49 341 9940 - 2570

---------------------------------------------------------------------------
You are receiving this message because you are subscribed to
the  FieldTrip list. 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/neuroimaging/fieldtrip.
---------------------------------------------------------------------------



More information about the fieldtrip mailing list