[FieldTrip] Trigger Detection in Yokogawa Data

Mathias Scharinger mscharinger at cbs.mpg.de
Tue Sep 27 18:19:10 CEST 2011


Dear all,

I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli.

Following the steps on the wiki, the problem is this line:

event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up');

After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by

temp = sqdread(sourceFile,'Channels',triggerlines(tnum));
trigs = find((diff(temp))>1000);

from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html)

the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value.

My question is now:
Could the two above lines somehow be implemented in the my_trial_fun file?

The above line gives (for trigs) the following structure:

trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share)
with the time points of the corresponding trigger line (here: 162).

Or could the ft_read_event function use the sqdread algorithm somehow?
I am not sure what causes the discrepancies with ft_read_event. 
Thanks for any help,
Mathias



----------------------------------------------------------
Mathias Scharinger (PhD)
Auditory Cognition Research Group
Max Planck Institute for Human Cognitive & Brain Sciences
Stephanstr. 1A - 04103 Leipzig, Germany
Tel.: +49 (0) 341-9940-2482





More information about the fieldtrip mailing list