Finding psychopy coordinate output in pixels

Hi! I have an experiment that measures reaction time for pressing different faces amongst distractor objects. The csv file saves both reaction time for each stimulus as well as the xy coordinates of the screen press. I’m trying to write a simple R script to calculate whether each press was correct (within xy boundaries for the target stimuli) but I’m struggling to determine the boundaries in a way that can be applied to psychopy’s coordinate format. The output in the csv is in a -1 to +1 format, but I need to convert that to pixels to be able to determine boundaries from the jpg in a web platform like pixspy. Can any one help?

Hi There,

In PsychoPy Builder if you use a mouse click there should also be a value mouse.clicked_name that indicates if an object was clicked (e.g. a target) - is it possible to check if that is saved to the data file?


The issue is my stimuli is a jpg with all the stimuli including target in it - they’re not individual images that I can assign as the target stimuli if that makes sense.

One approach is to have target polygons hidden behind the image and check for mouse clicks on them.

If you have output in norm units then you could convert to pixels by multiplying by the screen width/2 for the x coordinate and screen height/2 for y coordinate

1 Like

Thanks!! I don’t know why I didn’t think of this haha