Adapt window size based on distance to screen

Hello!

We’re developing a saccadic choice task with the Psychopy coder and Pylink and want to present stimuli both horizontally and vertically while maximizing their distance from the fixation cross. Specifically, we aim to achieve a 20° visual angle separation both vertically and horizontally.

We’re using an Alienware OLED screen with the following specifications: Width 1209.60 mm, Height 680.40 mm, and Resolution 3,840 x 2,160.

We’re using the Eyelink 1000 eye-tracking system, but there’s of course a limitation in terms of the camera’s maximum distance from the participant’s eyes/screen distance, making it impossible to track their gaze across the entire screen.

However, we want to display the experiment over as much of the screen as possible to ensure accurate calibration and eye tracking for targets separated by 20°.

Do you have any suggestions on how we could

  1. Calculate the maximum screen surface at a distance of XX (let’s say 100) cm allowing for accurate eyelink tracking (32° horizontally - 25° vertically) ?
  2. Most importantly, display the experiment full-screen on the defined screen surface (the rest of the screen staying dark, for example - see image) ?

Any advice on how to achieve this would be greatly appreciated !

I think you can achieve this by defining a Monitor object with the specifications of your setup (including distance from screen) and then using that monitor when creating the Window. From there, so long as units='deg', all the calculations should be handled automatically :slight_smile: you’d just need to use a Rect on a black background with size set as (32, 25)

https://www.psychopy.org/general/monitors.html