Пример #1
0
globalClock = core.Clock()
trialClock = core.Clock()
#Eye tracking (Tobii)
controller = TobiiController(win)
controller.setDataFile(eyedata)
controller.waitForFindEyeTracker()
controller.activate(controller.eyetrackers.keys()[0])
while True:
    ret = controller.doCalibration([(0.1,0.1), (0.9,0.1) , (0.5,0.5), (0.1,0.9), (0.9,0.9)])
    if ret == 'accept':
        break
    elif ret == 'abort':
        controller.destroy()
        sys.exit()
marker = psychopy.visual.Rect(win,width=5,height=5)
controller.startTracking()


#START DISPLAYING
message1.draw()
win.flip()#to show our newly drawn 'stimuli'
event.waitKeys()#pause until there's a keypress
#RATING TRIALS
for face_loop_val in face_loop:
    image.setImage(img_path + face_loop_val['name'])
    rating.reset()
    t = 0
    #Fixation
    fixation.draw(win)
    win.flip()
    core.wait(fixationtime,fixationtime)