| Reference | Downloads | Github

EyeLink and event.Mouse — conflict in units of measurement (pix vs. norm)

Apologies for the possibly silly question – I’m a bit of a beginner.

I’m programming an experiment in which participants must choose one of four pictures after having listened to a story, and I’d like to track their eye-movements while they perform the task. I’m interfacing PsychoPy with an EyeLink 1000 Plus via PyLink and EyeLinkCoreGraphicsPsychoPy.

I’m defining a window with size specified in pixels, as follows:

win = visual.Window((1680, 1050), fullscr = True, monitor='Eyelink',
                    color = (0, 0, 0), units = 'pix', colorSpace='rgb')

But as soon as I try to set the position of my event.Mouse(win) using mouse.setPos(newPos=(0,0)), I get this error:

ValueError(“Monitor EyeLink has no known size in pixels (SEE MONITOR CENTER)”)

I get that the problem is a matter of conversion between “norm” and “pix”. I can get the script to run by defining my monitor in the Monitor Center with the appropriate info as follows:

Size: (1680, 1050)
Screen distance (cm): 55
Screen width (cm): 50

… but my ImageStim’s and TextStim’s get blown out of proportion. I can play around with the distance and width values and get slightly closer to what the stimulus display should look like, but it’s still not good enough.

Note: The script works seamlessly if I never call event.Mouse().

Hope someone can help me fix this :sweat:

I forgot to mention that I am running PsychoPy 1.90.3 on a Windows machine.

Try this near the start of your code:

from psychopy import visual, monitors
mon = monitors.Monitor('EyeLink')

This should give you what it thinks the pixel dimension are as [width, height]. If it returns “None”, you can try adding this:


and at least in theory that should give it the pixel dimensions it’s looking for.