I’m new to PsychoPy and don’t have any experience with Python either.
I’m trying to immediately repeat a trial if the answer was wrong. I read some other posts in the forum but I can’t figure out how to implement this although it’s probably very easy.
I have a training routine with the stimulus etc, and then a feedback routine where it displays the feedback for 1 s, within a trials loop (random).
In the training routine, I have the following code at “end routine”:
you could add an additional loop around the trial and feedback routine, inside the trial loop (e.g. “answer_loop”). Set the repetition of the loop to a high number (e.g. 99) and made it sequential. In the feedback routine add something like that into the code component:
if corr==0:
msg=“wrong”
else:
msg="+"
answer_loop.finished = True
The other issue is that now I’m saving the reaction time for each trial separately, but I need them to be added up, i.e. rt incorrect + rt incorrect + rt correct = total rt. Do you know a way to do that? Or do I need to do it manually when analyzing the data?
Zora
in the training routine I have the following code to save the rt:
corr = resp_1.corr
rt = resp_1.rt