Back to the main page.

Bug 1324 - read_trigger and read_ctf_trigger produce different output

Status CLOSED WONTFIX
Reported 2012-02-13 09:42:00 +0100
Modified 2013-02-23 20:57:38 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 major
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Jan-Mathijs Schoffelen - 2012-02-13 09:42:57 +0100

Anecdotally, See attached event structure: when doing sum(strcmp('frontpanel trigger', {event.type})) we get 1106 when doing sum(strcmp('UPPT001', {event.type})) we get 1107 so 1 trial is missing from the frontpanel trigger trace. frontpanel triggers are created with read_ctf_trigger UPPT001 triggers are created with the more generic read_trigger. What's the difference? Given the experimental data from which the event structure is created, the UPPT001 is 'correct'. See also attached the 'stim' variable as created on line 62 in read_ctf_trigger, and the 'dat' variable as created on line 56 in read_trigger (they appear to be the same.


Jan-Mathijs Schoffelen - 2012-02-13 09:44:49 +0100

Created attachment 228 event structure and trigger channel there are 1106 frontpanel triggers, and 1107 UPPT001 triggers


Jan-Mathijs Schoffelen - 2012-07-17 10:32:49 +0200

Created attachment 294 trigger that causes a difference between read_trigger and read_ctf_trigger


Jan-Mathijs Schoffelen - 2012-07-17 10:46:02 +0200

Hmm, I kind of forgot from which dataset this was derived, but my hunch is that the difference in how both functions handle the data causes it. Could be an overlapping trigger issue. The attached figure shows the trigger that causes the difference; read_ctf_trigger has a hard time dealing with the two triggers that seem to overlap in time. For me this indicates that one should use 'UPPT001' rather than 'frontpanel trigger' to avoid this issue. If somebody else however would like to try and fix this, go ahead