def runExp(stimuliDir, exp): # instructions = hf.getInstructions(instructionsDir) ID, dataPath = hf.getID(exp) print(dataPath) win = visual.Window(size=[1400, 900], color="white", units='pix') # instructions and practice trial hf.presentText(win, instr1, text_ht=30) presentStimuli(win, demo_item, exp, ID, dataPath, presTime=presTime, catchBuffer=2.3) # practice trial # instructions + rest of trials. hf.presentText(win, instr2, text_ht=30) presentStimuli(win, stim_list, exp, ID, dataPath, presTime=presTime, catchBuffer=2.3)
def runExp(): # instructions = hf.getInstructions(instructionsDir) main_window = visual.Window(size=[1400, 900], color="white", units='pix') ID, dataPath = hf.getID(exp) # instructions and practice trial hf.presentText(main_window, instr1, text_ht=30) presentStimuli(main_window, dataPath, ID, demo_item, presTime, catchBuffer=2.3) # practice trial # instructions + rest of trials. hf.presentText(main_window, instr2, text_ht=30) presentStimuli(main_window, dataPath, ID, stimuli_list, presTime, catchBuffer=2.3)
# import stimuli stimuliDir = "/stimuli/" demo_item = [['prac', 'obj001accordion.jpg', '1', 1330]] #import cbal cbal = 'objects1.csv' with open(cbal, 'rb') as f: reader2 = csv.reader(f) stimuli_list = list(reader2) #variables buzzerGo = True # play buzzer slide fixGo = True # play fixation slide deadline, dataPath = float(hf.getID(exp)) presTime = deadline # how long before deadline buzzer sounds. print presTime # control functions quit_key = 'q' pause_key = 'p' # runtime try: shutil.rmtree("Data/wc32v.33_PTEST") except: print("TEST dir didn't exist.") #runExp()