I am trying to provide feedback after a completion of a block in a stop signal task.
I followed John’s example, [https://13321448614192655815.googlegroups.com/attach/bb1b039223f1acfa/blockFeedback.psyexp?part=0.1&vt=ANaJVrFVMdAhjuanbJBvGLFn45FLlt3dGvl2IiDZ9H_Zm33fCXJ8YXchne6QcPpaqJS5s3PT5GODvXXAxRvXsINlrTV0-v1ZyDow6LCXxT0q2ItjLjbUD_g].
But it seems that the sample code only works if there is only one routine.
Here is my code in the begin routine properties.
nCorr = StopRoutine.data['StopResp.corr'] meanRt = GoRoutine.data['GoResp.rt'] msg = "number of successful stop = %\nRT = %.3f in this block"%(nCorr.sum(),meanRT.mean())
Note that I have
in the begin experiment properties and a text routine displaying $msg below the code component.
When I run, I get
meanRT = GoRoutine.Data['GoResp.rt'] KeyError: 'GoResp.rt'
FYI, I also tried with
nCorr = StopRoutine.data['StopResp.corr'] msg = "number of successful stop = %i" %(nCorr.sum())
simplifying the code just requesting number of successful stops, but this code appeared to only store the last stop success, i.e., displaying 1 if the last stop was successful and 0 for stop failure in the last trial.
I would appreciate if you could help me solving this issue.