psychopy.org | Reference | Downloads | Github

PyGaze - GP3 Eye Tracker

eyetracking

#1

Hello everyone,

We are attempting to integrate a GazePoint GP3 tracker into our current experiment and while it seems like we got the GP3 demo to run through PsychoPy, it doesn’t appear that it is actually syncing up with the tracker data itself. Can anyone direct us how best to integrate the two? We are using the PyGaze code available online but are still having issues.

Thank you in advance,
Courtney


PsychoPy w/ GazePoint Eye Tracker
#2

Hi Courtney,

Sorry I missed this one.

I haven’t looked at PyGaze libraries.

There are a number of different ways to collect data from the GP3, however by “syncing up” I assume you mean send triggers into the eyetracking data, for stimulus onset etc. If this is correct then this is done by using the “USER” field in the GP3 output. it only takes a couple of lines of python code to do this.

Let me know where you are up to with this.

Thanks
Martin


#3

Thanks for the reply Martin. We have been having a really tough time getting the tracker data coordinated with our PsychoPy experiment. The tracker is now running through PsychoPy and the two programs appear to be communicating with one another, but we are unable to get the location data points to read out. Can you post an example of what you are referencing in your response above?

Thank you again,
Courtney


#4

Hi,

By “location data points” do you mean the eye gaze data?

The GP3 has quite a lot of fields in its output, but theres only a few that you actually need. The x and y coordinates for the eye gaze data are the fields FPOGX, FPOGY respectively. Also the coordinates that the GP3 uses is top left is 0,0 and bottom right is 1,1, whereas psychopy has 0,0 in the centre of the screen.

I will send an example Monday when I am next in week.

Any questions in the meantime let me know

Martin


#5

That would be great!

Thanks so much,
Courtney


#6

Hi Courtney,

Sorry I am late replying as I was busy Monday\Tuesday.

see files attached (Very very basic example)

the gazepoint.py file is a simplified version of the code that i worked on a few years ago now, that integrated the GP3 into the ioHub, see this thread here for more details.

however in our lab we do not use ioHub to collect data from the GP3, we instead use the gazepoint analysis software that comes with the GP3. You dont need the professional version as the free version collects data fine.

if you launch gazepoint control and gazepoint analysis, then in gazepoint analysis create a project and press record.

do a calibration then run the script attached called “simple_gp3_gaze.py”. Make sure the screen coords are correct at the top of the script, if you want the dot to follow your gaze, and have both files in the same folder.

when its finished go back to “gazepoint analysis” and press “stop record”. then select “analyze data” and “export”. you should be able to export the data in csv format. In it you will find a column called “USER” this is where the gp3.sendMessage(msg), in the script, sends the message to, this is how you “SYNC UP” the data with the GP3 so to speak.

Please come back if I have not explained myself well.

Hope all goes well
Martin

gazepoint.py (8.2 KB)
simple_gp3_gaze.py (1.6 KB)