Pupil labs core integration: send triggers or annotations to pupil capture

Hey guys,

I would like to integrate the pupil labs core eye-tracker into my experiment. I mainly want to send triggers to the capturing software to tell it, at which point a trial or block started, so I can analyze gaze positions during a particular trial/block. What would be the easiest way to do this?

Thanks a lot for your replies!


I want to say that the latest version of PsychoPy on Github has Pupil Labs functionality so I would start there. @Becca am I correct?

I don’t know about the eye tracker, but the “serial” and “parallel” packages for python let you send serial and parallel port signals, one of which your eye tracker may be able to interpret.

For serial ports

import serial
ser = serial.Serial('COM3',9600,timeout = 0.05)
message = 10
ser.write(message.to_bytes(1,'big', signed=True))

Some useful links:

For parallel ports

import parallel
par = parallel.ParallelPort(portAddress)

You would be correct! Pupil lab support just announced! https://twitter.com/psychopy/status/1494730369089912837?s=20&t=wohhYPAr8S_SeHVxwnHgmQ

Hi @RayBuehler,
Did you finally manage to solve the integration problem? I’m currently working on a similar experiment and would really appreciate some help since I’m kind of stuck.

Hey, unfortunately I decided to drop it in the end because it would have been to time intensive to make it work. Sorry I can’t be of more help.

I do know of a winter school in Zürich in January where they will teach pupil labs psychopy integration, if you’re interested I can send you a link!

1 Like