| Reference | Downloads | Github

Touchscreen and monkey participants

Bit of a strange one, maybe, but I’m having trouble running a simple experiment using monkeys (brown capuchins, specifically) as participants.

The monkey has to select one of a number of stimuli by touching the screen (on a MS Surface 4 running Windows 10). A stimulus is selected if the mouse position is within the stimulus — minimum(ish) example of the code I’m using is below.

This works absolutely fine if and only if the monkey uses a single finger to select the shape, but the problem I’m having is that the capuchins typically use multiple fingers and the palm of their hand, and the multiple contact points prevent the stimulus being selected. To see the problem I’m having, you could run the code below on a tablet and then try to select the shape using two fingers at the same time — the problem is largely outside of PsychoPy really, in that the multiple touches are being interpreted as multi-touch gestures.

I can’t obviously think of any solution to this, so would appreciate any suggestions at all. Purchasing new equipment is an option if that would help. Even confirmation that there’s not a way round this would be really useful at this point.

Thanks in advance!

from psychopy import core, visual, event

myWin = visual.Window(monitor="testMonitor", units="norm",fullscr=True,allowGUI=True,color=[-1,-1,-1])

stim = visual.Circle(myWin,radius=0.3,fillColor=[1,1,1])

while True:
    mousePos = myMouse.getPos()
    if stim.contains(mousePos):

1 Like

Yes, PsychoPy just gets events like that from the operating system and libraries like pyglet/pygame. As far as PsychoPy knows, a mouse can only have one position. It is the operating system that is responsible for deciding what that position is (i.e. disambiguating multiple fingers, palm etc). PsychoPy doesn’t “see” any of that raw level information.

But there do seem to be Python projects out there that may or may not address what you need, and it might be possible to use those from within PsychoPy:

1 Like

Hi Michael,

Thanks for this! These look promising, and in any case it’s good to have confirmation that there’s not an obvious solution in PsychoPy I’ve overlooked. I’ll have a play around and see if I can get something working.

Thanks again,