olafdimigen / eye-eeg

EYE-EEG toolbox for combining eye-tracking & EEG
https://www.eyetracking-eeg.org
37 stars 12 forks source link

Bug report: Problem with E-Prime "offsets" + Eyelink #20

Open olafdimigen opened 2 years ago

olafdimigen commented 2 years ago

Received the following bug report:

When we try to synchronize data in eeglab with eye-eeg, we found that messages could not be recognized from *.asc file. After lots of tests, finally we found that eye-eeg could not read messages with offset.

The full structure of Eyelink messages is:

`‘MSG' + timeStamp + [offset] + messageText`

Messages with [offset] means events happened [offset] millisecond ago. Like this:

`MSG    4336690 3151 face2_Onset 127`

And those without [offset] means events happens realtime. Like this(4333539 = 4336690 - 3151):

`MSG    4333539 face2_Onset 127`

Messages with [offset] are used in E-Prime to markup the actually onset time of each E-Object(stimulate screen).

olafdimigen commented 2 years ago

need to adapt regexp in parseeyelink.m

timestamps = regexp(tmp,'^-?\D+(\d+)','tokens','once','lineanchors');

olafdimigen commented 2 years ago

open question: how to differentiate cases with an offset from messages containing one or more integers as their user-defined "content"?