class TestWin(object): """ Creates a false window with necessary attributes for converting component Parameters to pixels. """ def __init__(self, exp, monitor): self.useRetina = True self.exp = exp self.monitor = Monitor(monitor) self.size = self.monitor.getSizePix()
# These are constants used for PyGaze. Note that these are automatically calculated using the values entered in # standard_parameters and Monitor - no need to edit anything here. from __future__ import division from psychopy.monitors import Monitor from standard_parameters import monitor_name, background_color mon = Monitor(monitor_name) mon_width = mon.getWidth() mon_size_pix = mon.getSizePix() mon_height = mon_size_pix[1] * mon_width / mon_size_pix[0] #BGC = 'grey' SCREENSIZE = (int(mon_width), int(mon_height)) DISPSIZE = (int(mon_size_pix[0]), int(mon_size_pix[1]))