123456789101112131415161718192021222324252627282930313233343536 |
- # a simple script which presents the grey, white, and green colours used in the experiment
- # I use this to record screen luminance
- from psychopy import visual, core, monitors, event
- # set up ViewPix monitor
- mon_Hz = 60 # refresh rate
- mon_framelen = 1/mon_Hz # length of one frame in seconds
- mon = monitors.Monitor(name='ViewPix', notes='{0}Hz'.format(mon_Hz))
- mon.setWidth(52)
- mon.setDistance(48)
- mon.setSizePix((1920, 1080))
- # mon.setSizePix((750, 500))
- mon.saveMon()
- # set up the Psychopy window
- win = visual.Window(fullscr=True,
- size=mon.getSizePix(),
- screen=1,
- monitor=mon,
- units='deg',
- color=[0, 0, 0])
- # hide the mouse
- event.Mouse(visible=False)
- colours = [[0,0,0], [1,1,1], [-1,-1,-1], [1,-1,-1], [-1,1,-1], [-1,-1,1]]
- print('Press space to continue...')
- for c in colours:
- print('Colour: {}'.format(c))
- win.color = c
- win.flip()
- win.flip()
- event.waitKeys(keyList='space')
|