Incorrect window size in Pavlovia

Hi! Thank you for your suggestion. I now think I figured out what was going on and I hope that maybe it can be of help to other experimenters.

So, I started by moving the window size check to the end of the routine as was suggested, and it resulted in some changes: the datafile reported [1536,864], which is the same size as in the post from 2020 I linked earlier: How to get user screen dimension information when running in Pavlovia? - #6 by ade_mh . The width is the same as when I measured it at the beginning of the routine, but the reported height is larger. This ratio matches my screen ratio, but the dimensions don’t match the actual screen dimensions (1920 x 1080).
The code that adjusts the picture to retain the picture ratio adjusted the pictures accordingly to the [1536,864] ratio when I moved it to the end of the routine. Interestingly, the picture size (I took a screenshot and measured the image size in pixels in Paint) was adjusted as if the code was using the real dimensions (1920 x 1080), i.e. size (1,1) rezulted in 864x540 px (preserving the picture’s 1.6 ratio).

Now, at this point I got the window ratio to match my screen ratio and the pictures to adjust accordingly to this ratio. What bugged me is why the screen dimension in the datafile was different from the real one and why the pictures were still adjusted based on the real dimensions.

I checked the screen settings of my laptop (i.e. the OS settings, not psychopy settings) and, as expected, the dimensions were correct (1920 x 1080). While looking at the settings I realized that I had everything (font, apps, and other items) scaled up to 125%, which is marked as “recommended” for my laptop in the dropdown menu. I changed it to 100% and tested my experiment without any changes in the code. The datafile now has the proper size of the screen (1920 x 1080), which is a win!

What confuses me is that the stimuli look absolutely the same in terms of size and location in both 100% and 125% settings. I would expect that if there is scaling up, then, if the pictures are of the same size, they would take up more space in the 125% screen and bigger pictures (or picture with an offset) potentially would not fit in the 125% screen. As far as I can tell, this does not happen, and stimuli look absolutely the same in both settings. What it makes me think is that saving participant’s window size is actually not informative, because it seems like two different reported “sizes” (1920x1080 and 1536x864) result in exactly same stimulus presentation, but correct me if I am wrong.