# Constant stimuli size but different positions in different screens

**URL:** <https://discourse.psychopy.org/t/constant-stimuli-size-but-different-positions-in-different-screens/18414>\
**Category:** Coding\
**Tags:** screen\
**Created:** [November 25, 2020, 2:54pm UTC](https://discourse.psychopy.org/t/constant-stimuli-size-but-different-positions-in-different-screens/18414 "2020-11-25T14:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni\_z](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@toni\_z](https://discourse.psychopy.org/u/toni_z)\
**Post date:** [November 25, 2020, 2:54pm UTC](https://discourse.psychopy.org/t/constant-stimuli-size-but-different-positions-in-different-screens/18414/1 "2020-11-25T14:54:03Z")

</div>

Hello everyone,  
I’ll try to be detailed but concise.  
I want to present stimuli (equilateral triangles, l 1.18cm, h 1.02 cm) with this size constant across screens thus I have used a screen scaling code (from screen scale.py) to do so.  
These triangles have stable positions (1.18 cm from each other) to form 2 5x5 matrices on the bottom and top of the screen (in different blocks), however, **the positions that in my screen are at the extreme bottom/top still result higher/lower in other screens.**  
Here’s my program. Thank you in advance.[perceptual\_learning\_version\_A.psyexp](https://discourse.psychopy.org/uploads/short-url/dlYQEsxSi4xJXrWiUlZ7BlFZqbU.psyexp) (152.8 KB)  
Ps. Unfortunately, I am forced to use Psychopy v 2020.1.3

---

<div class="post-metadata">

**Author:** ![TParsons](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/tparsons/32/8301_2.png) [@TParsons](https://discourse.psychopy.org/u/TParsons)\
**Post date:** [December 4, 2020, 9:22am UTC](https://discourse.psychopy.org/t/constant-stimuli-size-but-different-positions-in-different-screens/18414/2 "2020-12-04T09:22:20Z")

</div>

It sounds like you effectively want to set position as if the units were `norm` and size as if the units were `cm`? In the next major release, we’ll hopefully have something which will allow different units for different parameters, but as you’re restricted to 2020.1.3 you’re probably best off doing the conversion manually.

You can get the width of the screen in cm via `win.scrWidthCM`, and both screen dimensions in pixels via `win.size` - so the screen height in cm is:

```auto
win.size[1] * ( win.scrWidthCM / win.size[0] )

```

if you calculate this at the beginning of the experiment, you can store it as `scrHeightCM` and can then set the position as a proportion of the width and height in cm (e.g. if you wanted it in the top left corner, the position would be `(-win.scrWidthCM*0.5, -scrHeightCM*0.5)`)
