Switching screens
in OpenSesame
Hi, during one of my experiments I need to shift the active screen between two screens of varying resolutions. I know that the back end setting allows to select a specific monitor but is it possible to switch between monitors during the experiment?
Thanks in advance.
Comments
Hi @Jordan ,
You could use an "extended desktop" layout for your screens and then run the experiment in a window that spans the two screens. To make the window appear full screen:
Once you have done this, you can simply draw on either the left or right half of the window to make the stimuli appear either on the left or right monitor. That's probably easier than actually manipulating the window position.
Hope this helps!
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @sebastiaan , thanks for the reply.
Unfortunately, one of the screens if unique. It is an "old" fove VR headset that functions as a streoscopic second screen and has its own calibration function in the code I am using. Attempting to increase the resolution to encapsulate both screens causes issues with said calibration.
I believe it might be easier to simply do both parts in separate programs (as the second part is mostly evaluation and is pretty simple except for the screen switch).
In any case I am adding the VR calibration (rest of the file is too large to upload) If you can see any way split/shift screens that would not affect this process it might help future experiments.
Again, thank you for your support.
Jordan.
Managed to find a solution and am happy to share should the problem arise for someone else (of note I started with screen = 1 so here I god back to screen = 0):
# Import necessary libraries
from psychopy import visual, core
import os
# Define the new screen (e.g., 1 for the second monitor)
new_screen = 0
# Create a new window on the specified screen
exp.window = visual.Window(
size=[1920, 1080], # Adjust resolution as needed
screen=new_screen,
fullscr=True, # Change to False if you do not want full screen
allowGUI=False,
monitor='testMonitor', # Ensure this matches your monitor settings
units='pix'
)
# Brief pause to ensure window is created
core.wait(1)