psychopy.org | Reference | Downloads | Github

Transfering screen data together with eyetracking data

I would like to programm an eyetracking experiment in PsychoPy. Is it possible to also record the screen together with the eyetracking data so to get the eye movement + the stimuli the participant has seen in the SR Research Data viewer?

Some further details if that helps understandiing the question:
During the experiment the participants will see physics diagrams and would like to analyse where on the diagram they have looked at what time. The diagrams will be static.

Thanks for your help!

If you are using the SRR Data Viewer then you will be working from the eyelink (.edf) data files the eye tracker saves. You can send eyelink messages during the experiment that are intrepreted by the EyeLink Data Viewer as instructions on how to parse your data into trials as well as display things like background images etc.

For details on the message format required by the Data View, please see the “Protocol for EyeLink Data to Viewer Integration” section of the SRR Data Viewer documentation. For specific questions about the protocol, please contact SRR Support.

This should give you an idea of what would be involved though. To send a message to the eyelink data file you use the eye tracker sendMessage method. For example sending eyelink a message indicating the start of a trial would look something like:

# tracker is the iohub eyelink interface retreived from `launchHubServer()`
# replace < Trial ID value list > with any actual trial values you want DV to know about
tracker.sendMessage("TRIALID < Trial ID value list >")

To tell DataViewer that you presented an image at screen center, send something like this when the image is presented:

image_path = r".\images\diagram_name.png"
# SRR DV uses pixel coords, with screen center == win.size/2
x = win.size[0]//2
y = win.size[1]//2
tracker.sendMessage("IMGLOAD CENTER {image_path} {x} {y}".format(image_path, x, y))

To tell SRR DV that the trial has ended, send something like:

tracker.sendMessage("TRIAL_RESULT < possible trial result values >")