psychopy.org | Reference | Downloads | Github

Is it possible to get 250hz eyetracking data with the builder?

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2021.2.3
Standard Standalone? (y/n) If not then what?:y
**What are you trying to achieve?: An eyetracking reading experiment. More specifically, I am in the process of acquiring the eye-tracking data. It is not in the excel file, containing the rest of the data.

What did you try to make it work?: I tried inserting code in the isLook loop of the code of the ROI module, extracting the needed data, then adding it to the excel file with trial.addData().

**What specifically went wrong when you tried that?:

If I understand correctly, the looks from the ROI module is captured each frame of the psychopy experiment. Someone told me that the speed of those frame is 60hz. Since my eyetracking-device (Tobii Pro Fusion) is 250hz, I cannot use ROI looks. Is there a way to use the builder to collect data with an eyetracker faster than 60hz?

At each step of my eyetracking experiment’s creation with the psychopy builder, I seem to be lost in ignorance. I looked for a tutorial or guide for using the builder’s eyetracking functionnalities, but didn’t find anything else than source code. Is there something that I missed?

To get individual eye samples during the experiment, you will need to use a code component instead of the ROI component and add some custom python code. This will allow you to access all eye samples sent from the tracker.

Since you are using a Tobii, BinocularEyeSampleEvents will always be returned from the eye tracker. Details on available eye tracker methods and BinocularEyeSampleEvents can be found in the iohub api documentation.

In the Code component where you want to collect / process eye samples, add something like the following to the Each Frame tab:

    # For the Tobii, getEvents() will always return BinocularEyeSampleEvents 
    # Eye tracker needs to be recording... 
    samples = tracker.getEvents()
    for sample in samples:
        # Do what you want with each sample
        print(sample)

In a real experiment you would not want to be print every sample, this is just an example.

I looked for a tutorial or guide for using the builder’s eyetracking functionnalities, but didn’t find anything else than source code.

The documentation, particularly for the Builder eye tracking functionality, is very sparse at this point. This should improve in future releases as it gets out of Beta.