I’ve noticed this has been an issue for people in the past, which has usually been solved by using an older version of pyglet; that, however, is not working for me.
Quite simply, stimuli which are not specified a pos value, or stimuli that are given (0,0) both appear in odd places not in the center of the window. On the newest version of Pyglet, stimuli appear about halfway across the screen on the left. In older versions of Pyglet, they usually appear much bigger, barely visible in the top right corner of the screen (with the same code, all at pos=(0,0), and the window is the right size). When I run it with Spyder, the stimuli will appear one place, then in the PsychoPy coder, the same exact code will put the stimulus somewhere else. This is really strange and frustrating; I am really hoping there is some other fix for this, because adjusting the position of the stimuli would be extremely tedious if not impossible.
The strange thing is if I make the window full-screen, suddenly the stimuli are in the right place, which would solve the issue if not for the fact that making it full-screen displays the window on the wrong monitor… In other words, I specify screen=1 to display the experiment on the correct monitor (in fullscr=False), but when fullscr=True, it will display the window on the wrong monitor regardless of screen=0 or 1 etc. What the heck??
Here is some sample code:
from psychopy import visual, event, core
windims = {"w":1600, "h":900}
win = visual.Window(
size = [windims["w"], windims["h"]], pos = [0,0], fullscr=False, screen=1,
winType='pyglet', allowGUI=True, allowStencil=False,
monitor = 'big', color='black', colorSpace='rgb',
blendMode='avg', useFBO=True,
units='pix', useRetina = True)
instructions = visual.TextStim(win, text = "instructions yo", color = "magenta",
pos = (0,0), height = windims['h']*.1)
fixation = visual.TextStim(win, text="+", color="white", height = windims['h']*.08)
instructions.draw()
win.flip()
core.wait(2)
fixation.draw()
win.flip()
core.wait(2)
win.close()