I am running an eyetracking experiment using PsychoPy and Eyelink1000. To track pupil diameter change across a trial, I am trying to sync the timestamp from the eyetracker with the image start and stop times, however I am having trouble with the formatting. The begin and end times are in the format of “70.85238” and I cannot gauge whether this is coming from the frames past since program started. The eyetracker timestamp is miliseconds since the tracker started recording the data, I want to make sure to convert the formats so I can sync/can see the timeframe to plot the pupil data to! Any help is appreciated!
Did you ever find a solution to this?
I actually never got to convert the timestamp format, instead, I used the built-in PsychoPy clocks to send sample messages with Eyelink to mark when I’d want the trial to start and for sanity checks. So normally, there are other messages that help mark a trial end if you quit the experiment (something like
el_tracker.sendMessage('TRIAL_RESULT %d' % pylink.TRIAL_ERROR)). But instead of just using the trial start and trial end clocks, I wanted to be able to see when text or other stimuli are on the screen, so I wrote something like
if retIMG.status == STARTED: el_tracker.sendMessage('retImg %s' % RetrievalImageClock.getTime()) in the ‘run routine’ component, and
el_tracker.sendMessage('retimgEnding %s' % RetrievalImageClock.getTime()) in the ‘end routine’ component. This way I can sanity check that the stimuli are actually on for the duration I want and also use these messages to then match the beginning and end of a trial or the time of interest I want to measure pupil dilation over. It’s definitely not the same as being able to use the same time format in both Eyelink and PsychoPy but it helps sync/check some information!
@BaharSener this is very helpful! Thank you.