esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
671 stars 211 forks source link

Tobi Pro SDK / Opensesame Pygaze TSV File error #122

Closed Mirko2702 closed 5 years ago

Mirko2702 commented 5 years ago

Hi there,

I have noticed the following problem when using Pygaze in Opensesame in combination with Tobii eye trackers The timestamps during an eye-tracking recording are not synchronized with those indicating when a stimulus is started or stopped. See pictures. Please pay attention to the order of the time stamps. Strangely enough, this occurs completely irregularly.

I use a Tobii Pro Spectrum Eye-Tracker and a Tobii X3-120.

In the forum of Opensesame I was advised to contact the developers of Tobii Pro SDK @grebdems and @pedrotari7 here on github.

e878avhrsivk l4z6ye0uzy8g

grebdems commented 5 years ago

Hi @Mirko2702 This is actually expected behavior. The reason behind this is that there is a certain latency involved in the eyetracker calculating the gaze, and then sending it over to your computer. The gaze data is timestamped in the eyetracker with the eyetracker's internal clock. Tobii Pro SDK then keeps track of how that clock relates to your system clock so it can translate that internal timestamp into a timestamp that matches the other events that happen on your computer. When the gaze data arrives to your computer (and PyGaze/OpenSesame) it's already a little "old". It gets written into the log at the time it arrived, but with the timestamp of when the gaze pattern was actually recorded. Other events that happen on your computer, such as stimuli presenting, typically gets written into the log exactly when they happened (or at least with shorter latency). Hence the disorder of the logs.

So, to summarize it (TL;DR): Timestamps are correct. Order is misleading. Remember to use timestamps, and not order of log events in your calculations!

esdalmaijer commented 5 years ago

Thanks for clearing that up, @grebdems!

Mirko2702 commented 5 years ago

Hey @grebdems!

Thank you so much for the explanation. We already thought something like that. However, the import of the TSV data into the analysis software with those disordered time stamps was problematic and we wanted to make sure that the error was not caused by incorrect application on our part. But we could find a solution. So many thanks again.

dimitribayle commented 3 years ago

Hi Mirko, I have the same kind of datafile, extracted from opesesame connected to a tobii eyetracker. I'm looking for a matlab toolbox to analyzed the data, basically determined the number and position of fixation on each trials, but cna found it. Which tool are you using to analyze your file? Thanks

Mirko2702 commented 2 years ago

Hi Dimitri,

Sorry for the delay. I‘m using a software called Blickshift Analytics. It‘s not free 😕

dimitribayle commented 2 years ago

@Mirko2702 thanks for the reply. I'll have a look to Blickshift Analytics. The soft can read the TSV file exported from tobbi eyestracker directly? Do you have to modify the TSV file because of the disordered time stamps? (if so are you just "moving" your start trial in the file) Thanks

Mirko2702 commented 2 years ago

@esdalmaijer yes, Blickshift Analytics can read TSV files directly. Regarding the timestamps, as far as I remember, the developers of the software have implemented a solution during import. However, you still have to insert two lines of code within the software. Unfortunately, this requires the Ultimate version. A bit expensive to be honest. My faculty doesn't have the funds to buy another license at the moment, which is unfortunate. The possibilities that the software provides are really very good. If you have any questions regarding this, it is best to contact Mr. Raschke at Blickshift Analytics directly. Otherwise, I can also be of assistance.