Eyelink message timing

I regularly stamp messages into the EyeLink messagestream to indicate start and end times of on-screen events that I need to sync eyetracking analyses to. I do this by using the following command:


Eyelink('Message','This is an example message');


This causes a message to be stamped at that exact moment into the EyeLink messagestream. However, because I have to place the command just before or just after the on-screen event, technically it doesn't mark the exact moment of the event.


Ideally, I'd be able to get the timestamp of a Screen('Flip'), and then ask the EyeLink to posthumously stamp the message at the appropriate time in the messagestream. I know that I can handle this myself using a separate record of stimulus timestamps, but ideally I'd be able to store it in the EyeLink EDF, to avoid having multiple data files from each recording.


Does anyone know how to achieve this?

Hi Matt,

If you require that kind of timing precision, you' better work with a photodiode to timestamp the screen and use the TTL output of the eyelink (NB: I've never used that, and don't actually know what it signals exactly, but probably it'll allow you to get some kind of common timebase/offset between the two).

As far as I think i may understand the flip timestamping logic, it involves some calculation after the fact, so it'll always be a little "later". Best practice is to stamp directly after the flip, which should be good to about a ms or so on a well-working system (I think, haven't measured).

Cheers,
Dee

On Wed, Aug 1, 2018 at 5:49 PM, mattjdunn@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:


I regularly stamp messages into the EyeLink messagestream to indicate start and end times of on-screen events that I need to sync eyetracking analyses to. I do this by using the following command:


Eyelink('Message','This is an example message');


This causes a message to be stamped at that exact moment into the EyeLink messagestream. However, because I have to place the command just before or just after the on-screen event, technically it doesn't mark the exact moment of the event.


Ideally, I'd be able to get the timestamp of a Screen('Flip'), and then ask the EyeLink to posthumously stamp the message at the appropriate time in the messagestream. I know that I can handle this myself using a separate record of stimulus timestamps, but ideally I'd be able to store it in the EyeLink EDF, to avoid having multiple data files from each recording.


Does anyone know how to achieve this?




what i've done in the past is to also send the values of the flip timestamps as messages to the Eyelink system.

also, to handle clock drift between the two systems, my experiments have checked and stored the reported differences between the clocks at the start of every trial. these values are then later used as offsets when analysing the experiment data.
Can you expand a little on your "protocol" for calculating the drift. Do you use Eyelink('TimeOffset'), and then calculate the deltas between these offsets for successive calls? 

I'm not entirely clear on how to then apply this information. If there is drift, as long as the respective timestamps are consistent (i.e. the vbl and Eyelink('message') timestamp have a fixed realtime relationship), if there is a clock drift it doesn't matter if you lock the data analysis to the vbl and the eye data analysis to the message timestamps? 
yep, i am using Eyelink('TimeOffset').

i store the drift values for later use as i usually also use the Eyelink's event parsing.
OK, and so then during analysis do you use a "master" VBL and EDF timestamp (i.e. absolute time), then use the offsets from that initial state? 

I remember testing the EDF message vs. flip deltas several years ago, and everything was very reliable, but that ignored any drift, it used SYNCTIME locked to the flip (i.e. relative not absolute time)

Thanks! Ian