Incorrect window size in Pavlovia

Hi,

I am trying to develop an online study with visual stimuli. I am using normalized units and I am adjusting the size of the stimuli with a piece of code to preserve the ratio of the stimuli across different monitors. The code adjusts the stimuli based on infromation about participant’s screen ratio. I log the window size in the final datafile by using psychoJS.experiment.addData(“windowSize”, psychoJS.window.size) code.
My monitor is 1920x1080, but in the datafile the size ends up specified as [1536,738]. The pictures are changed accordingly to the [1536,738] ratio too.
I noticed that someone earlier had a similar issue with the incorrect window size but it seems like it was not resolved: https://discourse.psychopy.org/t/how-to-get-user-screen-dimension-information-when-running-in-pavlovia/

Could you please clarify if there’s a way to fix it?

Best,
Valeriia

To add to my post:

I suspect that pavlovia is using the size of the window as if it were not in the full screen mode (I highlighted it in red in the screenshot). The ratio in the datafile is 2.0813 (1536x738), and the ratio of this portion of the window is 2.0813 (1919x922). I am not sure if that’s what’s going on, but maybe it’s a clue.

What I do is check the Window size after the experiment has started (e.g. end of the first routine) rather than in Begin Experiment if I need to know the actual size in full screen rather than just determine whether the screen is in portrait or landscape mode.

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.