psychopy.org | Reference | Downloads | Github

Stimuli on mac retina display are in bottom left corner

screen

#1

Hi,

Window parameters that work on a PC running Ubuntu 16.04 result in stimuli that are left-offset on a MacBook Pro (Retina, 15-inch, Mid 2015) running High Sierra 10.13.2. I believe that I’m using the same version of Psychopy (installed via Conda, so without the standalone package/Builder) and I’m using Pyglet 1.3.0. Both operating systems are using a virtual environment that uses Python 2.7.

I’ve tested this using several different task scripts that were previously functional on Ubuntu and this problem seems to be independent of the retina pixel to logical pixel conversion problem (where there are 2 retina pixels for every logical pixel).

I’m new to Psychopy, so there may be some obvious solution that I’m missing – if so, I really appreciate your help!

Window code:

window = visual.Window(size=[1440,900],pos = [0,0], monitor='testMonitor', color = [-1,-1,-1],
       colorSpace = 'rgb', blendMode = 'avg', useFBO = False, allowGUI =
       False,fullscr=False, winType='pyglet',units='cm')

These two fractals should be at the center of the screen:

UPDATE:

The problem persisted whether I used pixels or cm.

Once I upgraded to Psychopy 1.85.6, the problem was resolved, suggesting that the problem was with pyglet’s updating of size value (useRetina was not an attribute of the Window object in the version that I was previously using, so I couldn’t fix it that way). Thank you, everyone, for your help!


#2

As a test, try positioning something in units of pixels instead of cm. If the appearance matches between Ubuntu and MacOS when positions are specified in units of pixels but not when specified in cm, that implies that the bug is somewhere in the cm to pixel units conversion.

The cm to pixels conversion would need to know the monitor dimensions, where does it get those? Seems like the most likely cause is that it has the wrong monitor dimensions. Find out how to read those out and see if they match the actual monitor size.

best,

Allen


#3

This is an issue with the retina display conversion; piglet had used the fill retina resolution (twice the height and width) but hasn’t updated its size value to reflect that.
You don’t mention what version of PsychoPy you installed but i think the latest 1.85.6 will fix this and give you full retina resolution. Alternatively turn retina to be False in the window creation


#4

Hi Jon,

Is there a way to install this version outside the downloadable stand-alone version? Pip installs/upgrades only version 1.85.3, not any higher. Maybe I am missing something.

Many thanks!
Jordy


#5

I’ve pushed 1.85.6 to PyPI so pip install -U psychopy should work now.


#6

Hi Jon,

Thank you very much for pushing 1.85.6. This fixes the above mentioned issue. It, however, does not solve the following two issues:

  1. Opening a window on an external monitor cannot operate in full screen. Full screen does work for the main screen (screen=0). Also, opening a window on an external monitor opened a window that was not at pos=(0, 0) by default, I had to add pos=(0, 0) in the call to visual.Window().
  2. Stimuli and text do not appear in the window when the window is opened on an external monitor. The stimuli and text do appear when the window was opened on the main screen (screen=0).

Code snippet:

from psychopy import visual, core

win = visual.Window(screen=1, monitor="testMonitor", fullscr=False, pos=(0, 0), size=(1680, 1050))

msg = visual.TextStim(win, text="Hello World!", pos=(0, 0))
msg.draw()
win.flip()

core.wait(5)

win.close()
core.quit()

I am using python 2.7.14, Psychopy version 1.85.6, on Mac OS X El Capitain (version 10.11.6).