What I am trying to accomplish
- I have multiple routines (7 in total) with criterions to be met before moving onto the next criterion
- The routines will be recorded so I can see how many trials it takes to reach criterion
What is happening/my issue
- The history counter is still going so the first routine so when they meet criterion for the first routine, when doing the second routine, they get 1 correct and then they move on. I imagine this is because the routine did not rest some kind of accuracy history.
- I am not able to see how many trials they took in order to reach criterion.
Here is the overall data for the routines (same for each routine)
total_trials = 0 avg_acc = 1 acc_hist = 
total_trials = total_trials + 1 acc_hist.append(keyResponse.corr) if(len(acc_hist) >= 12): acc_hist.pop(0) avg_acc = sum(acc_hist) / len(acc_hist) if(avg_acc >= 0.9 and total_trials >= 12): AB.finished = True
soundfile = ['correctDING.wav','incorrectBUZZER.wav'] msg = 'whoops!'
if not keyResponse.keys : msg="Failed to respond" elif keyResponse.corr:#stored on last run routine sound = soundfile msg="Correct!" else: sound = soundfile msg="Incorrect"
Let me know what you all think and what I can do to change this for my dissertation.