I’m having two confusing issues using the PsychoPy module.
Issue #1: When creating a window, using screen = 1 rather than screen = 0 displays an open black window on my second monitor, however it does not draw any of the visual stimulus on this monitor despite this window being selected. I was wondering if this is a known issue and if a work around is present.
Issue #2: When setting a resolution of either display, I get the same error message:
WARNING User requested fullscreen with size [2560 1600], but screen is actually [1440, 900]. Using actual size
Despite my monitor resolution actually being 2560x1600.
Here is the function that creates my window (resolution would be the tuple containing 2560, 1600) :
def openWindow(resolution):
win = visual.Window(
size=resolution, fullscr=True, screen=0,
allowGUI=False, allowStencil=False, units='deg',
monitor='', color='black', colorSpace='rgb',
blendMode='avg', useFBO=True)
win.recordFrameIntervals=True
# store frame rate of monitor if we can measure it
TASK_INFO['frameRate'] = win.getActualFrameRate()
if TASK_INFO['frameRate'] != None:
frameDur = 1.0 / round(TASK_INFO['frameRate'])
else:
frameDur = 1.0 / 60.0 # could not measure, so default 60 Hz
# Add multiple shutdown keys "at once".
for key in ['q', 'escape']:
event.globalKeys.add(key, func=core.quit)
return win
And here is a short snippet of code that creates a welcome stimulus (Which only displays when screen=0 is selected in the previous code. Assume the window parameter inputted is the window object created by openWindow().
Welc = visual.TextStim(win=window, name='Welc',
text=u'Get Ready!', units='norm',
font=u'Arial', height=0.1, wrapWidth=None, ori=0,
color=u'white', colorSpace='rgb', opacity=1,
languageStyle='LTR',
depth=0.0);
event.Mouse().setVisible(False) #Hide mouse
saveDataFrame() #Make sure folder and file are created.
Welc.draw()
window.flip()
Other miscellaneous info: Running the latest version of PsychoPy on Python 3.6.13