psychopy.org | Reference | Downloads | Github

Get Window Size/Using Height Units

For my experiment the participants click on an image of a graph, and then it returns x and y mouse click coordinates. The problem I am having is how to convert those coordinates to the location on the image (which in this case is a graph) that they clicked.

My understanding is that if I use height units, the images will be the same size proportionally across all windows, so if I were able to get the participants window size then I could determine the height units of their window which would then let me determine the height units on the image I am using which would then tell me the location of the mouse click on my image.
What I am having trouble doing is getting the participants window size.
I also want to make sure my logic is correct that height units will show the images proportionally to the window size.

Do you need the window size if you have the mouse location and the graph size in height units?

that is what I am wondering, will the height units of the graph be the same even if the absolute height units for the window change?

If your graph is an image you could present it at, say, size (1.2,0.8) so it is always .8 of a screen tall.

meaning in height units?

wouldn’t that be proportional to the screen size?

Yes, but so is the mouse location.