psychopy.org | Reference | Downloads | Github

Unexpected behavior with height units between online and local versions

OS: OS X 10.11.6, but behavior observed on Win10 as well
PsychoPy version: 3.2.4
Standard Standalone?: yes

We have a draft version of our paradigm built in Builder that includes mp4 video clips. Our experiment settings > screen is set to height for the units:

and our settings for the video are set for “from exp settings”:

To make the video visible locally on our computers (running the python script) we have to set the position and size to the settings seen above - position (-175, 100) and size (1500, 800) to see the video onscreen:

However, in order to make the video visible online (running the javascript export from builder), we have to use the units that make sense for height according to the documentation page. Something like position (-0.18, 0.18) and size (1, 0.52).

We have a python code snippet in that routine pertaining to showing a timer onscreen that hasn’t been translated to javascript, but the repo with a draft version of the experiment is here: https://pavlovia.org/kristenklemenhagen/websurf8

Any ideas what we can do to make the height units work the same in the local/python version as they do in the online/js version? Thanks in advance for any help!

Hi @kristenk, if you set the experiment setting units to ‘height’, and then tell your moviestim units to use the exp settings units, you also need to set the actual size and units of your movie stim to something relevant to ‘height’ units e.g., size and positions are currently in pixels, and will not show your movie correctly e.g., (-175, 100) positions the movie 175 screen heights to the left of the screen, and 100 screen heights above the screen.

What happens if you set the movie stim units to height, and use position (-0.18, 0.18) and size (1, 0.52)?

@dvbridges thanks for the reply. I have taken a screenshot of all 4 conditions so you can compare:

"correct" settings for position and size when using height units - position (-0.18, 0.18), size (1, 0.52)

Online (js) - expected behavior.

Local to laptop (py) - not expected behavior. Video not visible.

"incorrect" settings for position and size when using height units - position (-175, 100), size (1500, 800)

Online (js) - expected behavior. Screen flickers colors, looks like a huge blown up video is playing.

Local to laptop (py) - unexpected behavior. Video is visible onscreen.

We are trying to use our local laptops for development without pushing to pavlovia and running online every time we make a change, but the only way to make the video visible locally during development is to use the incorrect settings. We’d like to fix this and also understand why it is happening, because we expect the paradigm to be used online on a variety of screens. Our best guess at this point is that it has something to do with the following in the documentation: With ‘height’ units everything is specified relative to the height of the window (note the window, not the screen). Our experiment goes to fullscreen immediately, but maybe there is a window on startup that is changing the calculation of window size? If it helps here are the dimensions that are retrieved automatically on my machine running PsychoPy3 (1680 x 1050) with full screen window checked. Looking up the specs for my machine, it looks like it is 2880 x 1800 for the full screen.

Any ideas how to resolve this?