I am using psychopy to design an experiment in which participants reach for targets using their mouse. Success is determined by whether the target circle contains the mouse during a specific time window. We have stored a boolean variable which indicates whether the participants succeeded or not. We tried to set that boolean value as the response for a staircase of target size in a code component, but it seems to have no effect and the trial is recorded as incorrect every time.
trials.addResponse(pos_corr)
Going through the code, I found a comment preceding a line:
# NB PsychoPy doesn't handle a 'correct answer' for mouse events so doesn't know how to handle mouse with StairHandler
trials.addData('mouse_6.x', mouse_6.x)
So I suspect that it has been returning false because of this. There is no keyboard component in the experiment.
Is there any way that I can set up the response for the staircase manually? Thanks in advance!
OS (e.g. Win10): Mac Big Sur PsychoPy version (e.g. 1.84.x): 2020.2.8
Hi wakecarter, thanks for the response! I don’t want to add a line to my data file though, I want to set up a variable as the response for my staircase update. Do you have any solutions for that?
Did you ever find a solution to this problem? I want to use the returned value from a rating scale to make up/down (incorrect/correct) decisions to “feed” the staircase algorithm. Currently I’m trying to simulate the subject having pressed ‘left’ or ‘right’ on the basis of a code block - and not having much joy.