Hi, everyone! I have an experiment where people have to say if two figures are the same or not. The first figure appears at 1sec, the second at 2sec and the “right/wrong” buttons at 3sec, and I have the following code to keep track of the time on the routine of the feedback, which plays sounds for when it’s right or wrong. Unfortunately, the time between routines is not constant and it keeps adding time so I can’t calculate the real reaction time. Does anyone know how to set it to zero once the “right/wrong” buttons are on the screen?
Begin Experiment
soundfile = ['files/sound_correct.wav', 'files/sound_wrong.wav']
clock = core.Clock()
resultats = open('training_resultats.txt', 'w')
Begin Routine
if correct.contains(mouse):
sound = soundfile[1]
resultats.write('1 correct ' + str(clock.getTime()) + '\n')
else:
sound = soundfile[0]
resultats.write('1 wrong ' + str(clock.getTime()) + '\n')