import pygame import fixdur_tracker as tracker import pylink pygame.init() # set up the window surf = pygame.display.set_mode((1280, 960), 0, 32) pylink.openGraphics() el = tracker.Tracker(surf, 'test1.edf') el.setup() el.start_trial()
# flags = pygame.FULLSCREEN | pygame.RLEACCEL | pygame.HWSURFACE surf = pygame.display.set_mode(rectXY, flags, 32) #surf = pygame.display.set_mode(rectXY, pygame.FULLSCREEN , 32) #surf = pygame.display.set_mode(rectXY, 0, 32) pygame.mouse.set_visible(False) memory_image = pygame.image.load(path_to_fixdur_code + 'images/memory.png').convert_alpha() # set up eyetracker pylink.openGraphics() rand_filename = ''.join( random.choice(string.ascii_uppercase + string.digits) for x in range(8)) print rand_filename el = tracker.Tracker(surf, rand_filename + '.EDF') #start slide show #tools.slideshow(surf, np.sort(glob.glob(path_to_fixdur_code+'images/instructions/intro*.png'))) #el.setup() # show fixation cross fix_cross = pygame.image.load(path_to_fixdur_code + 'images/fixationcross.png').convert() surf.fill((128, 128, 128)) #surf.blit(fix_cross,(rectXY[0]/2-(np.array(fix_cross.get_size())/2)[0],rectXY[1]/2-(np.array(fix_cross.get_size())/2)[1])) pygame.display.update() #training trials if START_TRIAL == 0: trial.training(surf, el, memory_image.copy(), fix_cross.copy())