# Clicked Pixels of Stimuli

**URL:** <https://discourse.psychopy.org/t/clicked-pixels-of-stimuli/23228>\
**Category:** Builder\
**Created:** [May 27, 2021, 12:34am UTC](https://discourse.psychopy.org/t/clicked-pixels-of-stimuli/23228 "2021-05-27T00:34:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ash.rmit](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@ash.rmit](https://discourse.psychopy.org/u/ash.rmit)\
**Post date:** [May 27, 2021, 12:34am UTC](https://discourse.psychopy.org/t/clicked-pixels-of-stimuli/23228/1 "2021-05-27T00:34:16Z")

</div>

Hi everyone. I’m new to PsychoPy and coding and was hoping somebody could help me with the below? Thanks.

**OS** (e.g. Win10):  
Win10

**PsychoPy version** (e.g. 1.84.x):  
2021.1.4

**Standard Standalone? (y/n)** If not then what?:  
Yes

**What are you trying to achieve?:**  
I am setting up a Change Blindness task and have the locations of each target relative to the pixels in the image. When I saved the mouse data for the experiment, it gives me negative values. Is there a way to have PsychoPy record what pixels were clicked within each image?

**What did you try to make it work?:**  
I have tried to find solutions on here and Google but I can’t seem to find any information about it.

**What specifically went wrong when you tried that?:**  
I get the mouse X,Y positions which I believe are based from the centre of the screen?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 27, 2021, 6:57am UTC](https://discourse.psychopy.org/t/clicked-pixels-of-stimuli/23228/2 "2021-05-27T06:57:19Z")

</div>

Are all of your images the same size?

If your regions of interest are positions relative to the top left then you could convert the mouse coordinates using something like.

mouseX = images.size[0]/2 + mouse.getPos()[0]

mouseY = images.size[1]/2 - mouse.getPos()[1]
