psychopy.org | Reference | Downloads | Github

PsychoPy with Tobii

Hi, I am using the latest version of PsychoPy on W10, along with Tobii (X3-120 if that’s important) for eyetracking. I have an experiment written in PsychoPy, and would like to record eyetracking data with the Tobii device.

I saw on the page that it is possible to connect to Tobii using the tobii_research library and to output the data stream, which looks like it works for me. My question is: how can I record the eyetracking data, while running the experiment in PsychoPy, such that I can analyse that eyetracking data using the Tobii software? I really don’t want to have to rewrite my experiment in the Tobii software (not sure if it would even work).

Maybe there is some way for PsychoPy to instruct Tobii to beging a screen recording, and to send event markers from the experiment to the Tobii software?

I understand that you aren’t Tobii so can only provide minimal help, but if I speak with Tobii then they will also say that they are not PsychoPy :slight_smile:

1 Like

I’m just bumping this because I’m still at a loss.

More generally, what should the approach be to even implement eyetracking in the first place? For example, should I be: (1) starting the tracker at the start of the experiment and then using the getEvents() method during the while continueRoutine: loop? Also, regardless of how these data are acquired, what would be a recommended way to store the data? Containing the outputs in a dictionary that grows throughout the study feels like it might be inefficient, but then there will be a significant overhead with writing directly to a file on each trial, but I could be wrong.

I appreciate any feedback!

I have made quite some progress in getting this running, just in case others see this thread and wonder the same. There was an old tutorial by Alexander Nitka which was incredibly helpful. I decided to adapt some of the code he wrote for my own purpose, and I also wrote a Python script that will preprocess the eyetracking file that gets output. See it here - hope it is useful.

Still, it would be nice if there was a way to use these outputted data with Tobii Studio/Labs so that we can make use of their calculations and visuals. I will post if I make any progress for that.