Converting Eyelink / Pygaze coordinates to be "compatible" with OS coordinate system
Dear forum,
I have a short question about how to pre-process my eyetracking data that has been collected with PyGaze and the eyetracker EyeLink 1000 Plus.
Since I would like to pre-process my eyetracking data, I wanted to confirm the following:
- Pygaze coordinates: top left is origin of coordinate system (0,0)
- OS coordinates: (0,0) is in the center of the screen
Therefore (from what I read here in the forum) to "convert" the Pygaze data to be compatible with the OS coordinate system, is it the correct approach to subtract half the width and height from the gaze position from the Eyelink data?
So, if I take one example datapoint from EDF Eyelink file:
- x: 954.3, y: 529.8
Following this logic, I would divide both by 2 to get the following coordinates that are then "compatible" with the OS coordinate system?
- x: 954.3 / 2 = 477.15
- y: 529.8 / 2 = 264.9
Thanks a lot in advance!
Best,
Sarah
Comments
Hi Sarah,
yeah that sounds correct. But to be sure, you can check the calibration points, which should also be in the EDF file. When you subtract half of the width/height from them, and plot circles at those locations, can you reproduce the calibration screen?
To be clear this here:
Following this logic, I would divide both by 2 to get the following coordinates that are then "compatible" with the OS coordinate system?
is only correct, if the x,y pair you are interested in is the rightmost bottom coordinate of the screen. For all other positions you would need to do : x = x - width / 2 and y = y - height / 2
Eduard