#print(expInfo['frameRate']) mon = monitors.Monitor(expInfo['Monitor'], distance=56) #=======================================================================================# #Opening the appropriate a CRS class of the desired / necessary type print("open CRS") if expInfo['Device'] == 'Bits++': bits = crs.BitsPlusPlus(win, mode='bits++', rampType=1) if expInfo['Device'] == 'Bits#': bits = crs.BitsSharp(win, mode='bits++', checkConfigLevel=1) if expInfo['Device'] == 'Display++' or expInfo['Device'] == 'None': if expInfo['Touch screen'] == "Yes": if expInfo['Device'] == 'Display++': bits = crs.DisplayPlusPlusTouch(win, mode='bits++', checkConfigLevel=1) else: bits = crs.DisplayPlusPlusTouch(win, mode='bits++', checkConfigLevel=1, noComms=True) else: if expInfo['Device'] == 'Display++': bits = crs.DisplayPlusPlus(win, mode='bits++', checkConfigLevel=1) else: bits = crs.DisplayPlusPlus(win, mode='bits++', checkConfigLevel=1, noComms=True)
import sys from psychopy import monitors, filters, gamma, visual from psychopy.visual import gamma from psychopy.hardware import crs from scipy import misc mon=monitors.Monitor(expInfo['Monitor'],distance=56) print("open CRS") if expInfo['Device']=='Bits++': bits = crs.BitsPlusPlus(win, mode='bits++',rampType=1, frameRate=120) if expInfo['Device']=='Bits#': bits = crs.BitsSharp(win, mode='bits++',checkConfigLevel=1) if expInfo['Device']=='Display++': if expInfo['Touch screen']=="Yes": bits = crs.DisplayPlusPlusTouch(win, mode='bits++',checkConfigLevel=1) else: bits = crs.DisplayPlusPlus(win, mode='bits++',checkConfigLevel=1) if expInfo['Device'] != 'Bits++': if bits.noComms: sys.exit #bits = crs.BitsSharp(win, mode='bits++') #gamma.setGamma(win.winHandle._dc, 1.0, 1) bits.sendMessage('$TemporalDithering=[ON]\r') bits.read(timeout=0.1) bits.sendMessage('$VideoFrameRate\r') bits.read(timeout=0.1) bits.sendMessage('$enableGammaCorrection=[invGammaPF225fA.txt]\r') bits.read(timeout=0.1) bits.sendMessage('$EnableTouchScreen=[OFF]\e')