print "loading sides/colors order..." csShuffler = shuffler.MultiShuffler([sides, colors], trials) csList = csShuffler.shuffle() print "configuring stimulus displays windows..." if block == "overlapping" or block == "sequential": x = screen.size[0] / 2 y = screen.size[1] / 2 else: x = screen.size[0] / 4 y = screen.size[1] / 2 print "Beginning block now..." experiments.showInstructions(screen, instructionText, textcolor=(0, 0, 0)) if subtrials == -1: stimList = stimList csList = csList else: stimList = stimList[0:subtrials] csList = csList[0:subtrials] for stim, cs in zip(stimList, csList): pressed = False ratio = getattr(stim, "ratio") n1 = getattr(stim, "seed") n2 = int(round(n1 * 1 / ratio, 0)) size = getattr(stim, "size")
print "loading sides/colors order..." csShuffler = shuffler.MultiShuffler([sides, colors], trials) csList = csShuffler.shuffle() print "configuring stimulus displays windows..." if block == "overlapping" or block == "sequential": x = screen.size[0] / 2 y = screen.size[1] / 2 else: x = screen.size[0] / 4 y = screen.size[1] / 2 print "Beginning block now..." experiments.showInstructions(screen, instructionText, textcolor=(0, 0, 0)) if subtrials == -1: stimList = stimList csList = csList else: stimList = stimList[0:subtrials] csList = csList[0:subtrials] for stim, cs in zip(stimList, csList): pressed = False ratio = getattr(stim, "ratio") n1 = getattr(stim, "seed") n2 = int(round(n1 * 1/ratio, 0))
acc = 0 word = random.choice(words[gowords[0]]) else: acc = 1 word = random.choice(words[gowords[1]]) print word w, v = printWord(screen, str(word), 48, [255, 255, 255]) p = Presentation(go_duration=[0.675, 'seconds'], viewports=[v]) p.parameters.handle_event_callbacks=[(pygame.locals.KEYDOWN, key_handler)] p.go() sub.inputData(trial, "word", word) sub.inputData(trial, "block", block) sub.inputData(trial, "RT", RT) sub.inputData(trial, "acc", acc) sub.inputData(trial, "accTally", ACC) #feedback if acc: cp.go() else: icp.go() fix.go() ACC = 0 showInstructions(screen, "Time for a break. Press space to continue.")
print "loading ratio/seed/size/exemplar order..." myShuffler = shuffler.MultiShuffler([ratios, seeds, size, exemplars, shapes], trials) stimList = myShuffler.shuffle() sides = shuffler.Condition(order, "sides", 5) print "loading sides order..." csShuffler = shuffler.Shuffler(order, trials, 3) csList = csShuffler.shuffle() x = screen.size[0] / 4 y = screen.size[1] / 2 print "Beginning block now..." experiments.showInstructions(screen, instructionText, textcolor=color) if subtrials == -1: stimList = stimList csList = csList else: stimList = stimList[0:subtrials] csList = csList[0:subtrials] line = TextureStimulus(anchor='center', color = [255, 255, 255], position = [screen.size[0]/2, screen.size[1]/2], size= [4, 680]) for stim, cs in zip(stimList, csList): pressed = False ratio = getattr(stim, "ratio") n1 = getattr(stim, "seed")