[FieldTrip] Beginner questions regarding trialfun and nex data

Aaron T aaron__t at hotmail.com
Tue Nov 6 19:27:44 CET 2012

I am trying to read event data from .nex files, and having a wee bit of difficulty. When I use the code 
cfg = []
cfg.dataset = 'Filename.nex'
cfg.trialdef.eventtype = '?'

The only event data that is returned is the Strobed channel with a number of values. Using event type = 'gui' yields a similar result.
Looking at the example provided in the spikefield tutorial, I have run the same commands on the p029_sort_final_01.nex sample data on the website; this yields similar results (only the Strobed event type is returned, with a number of associated values).  These values appear to correspond with the events that would be of interest:  Looking at the trialfun_stimon.m code I see the following: 
hdr   = ft_read_header(cfg.dataset);
event = ft_read_event(cfg.dataset);
correctresponse  = 10041;
begintrial       = 10044;
endtrial         = 10045;
stimon           = 10030;
distractorChange = 12000;
targetChange     = 12001;
attCnds          = 20001:20004;       % att in/out by target change first/second
I have looked at the sample data in offline sorter and neuroexplorer and cannot figure out from where these values for the Strobed event type (the only event returned by fieldtrip), are being ascertained (e.g., so I could write my own version of trialfun)?  Any help very much appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20121106/5eaffc7a/attachment-0001.html>

More information about the fieldtrip mailing list