Problems using the new Tobii Pro SDK in OpenSesame/PyGaze
I've posted this as a comment in PyGaze and OpenSesame support for the new Tobii Pro SDK announcement but it is probably more suited as an independent discussion, so I'll repost it here:
I have been able to use the new Tobii Pro SDK in both PyGaze (alone) and OpenSesame.
To use the new Tobii SDK support in OpenSesame, I manually updated (replaced) PyGaze package to match the latest changes in PyGaze's GitHub repository, installed both the old and the new Tobii SDKs and updated (replaced) OpenSesame plugins for PyGaze (so that both
Tobii-legacy appear in
While both the legacy and the new option run in OpenSesame, I'm getting (what to me looks like) some unexpected behaviour with the new one:
The "track status box", at the beginning of the calibration process, is much less responsive in OpenSesame than in PyGaze and sometimes the text disappears and it freezes. As far as I could tell this does not happen in PyGaze.
The text and the calibration points cannot be seen if the background color is set to white. In PyGaze the calibration screen colours apear to be independent from what is set in
FGCvariables, so they remain visible.
If the option "Automatically log all variables" in a
pygaze_logitem is checked, there is a very noticeable lag (of seconds) in the experiment. (At first I was convinced that the lag happened on keyboard responses but this was due to the succeeding
pygaze_logitem). With Tobii-legacy there is no noticeable lag. Even for small messages, it seems that the logging events take many times longer with the new Tobbi SDK module. Looking at the time between a logging message signalling the start of a stimuli display and the subsequent sketchpad (with the "Automatically log all variables" option unchecked) in OpenSesame log, the time difference is of about 2.7 ms using Tobii-legacy and 44 ms using the new Tobii module.
(This is the one that worries me the most) I have not been able to align the eye-tracking data with the experimental events. I have created
pygaze_logevents immediately before and after the stimuli display and, while the difference between the timestamps of these events matches the display time of the stimuli (~3000 ms), if I look into the slice of data that fits in-between these timestamps it misses more than one second of data.
Even if I ignore the events and look into the blocks of data in-between the big time jumps that signal the transition from one trial to the next, the "continuous" blocks of data are not big enough to contain the whole trial (from
pygaze_stop_recording). The impression I have is that there is actually data missing.
It is also weird that, looking at the times in OpenSesame log, the difference between
time_pygaze_start_recordingand the subsequent item (a sketchpad with a fixation dot) is of over 1000 ms, as if the eye-tracker was taking over 1 second to start recording, while with Tobii-legacy this is about 6 ms.
I have tried this both in PyGaze and in OpenSesame with (apparently) the same result.
The eye-tracking data logs are substantially different between the old and the new Tobii SDKs. I've been able to align the data with the events in the old one but not the new.
This might turn out to be just my inexperience but I did spend a very long time trying to make sense of this data and without success.
The following link contains a very simple experiment in OpenSesame, the log files generated using the old and the new Tobii SDK and excel files evidencing what I explain here.
Note: I'm using a Tobii Pro X2-60 eye-tracker in a Windows 10 operating system and the backend is PsychoPy.
Sorry for the very long message!
This all needs to be verified by someone who actually understands a little bit more about this...
Any help will be much appreciated! Thanks!