PsychoPy version 1.83
Im trying to develop a task where there will be a background grid of four rectangle boxes, an image will appear in one of the rectangular boxes. I have used 8 images and inserted condition for the experiment trials. As I said earlier, out of 8 images, one image will appear on one of the rectangular boxes. Participant needs to click mouse against the target image which appears on the respective rectangular box. I have written the code like this. But the responses are not getting recorded accurately.
Begin experiment: a_sound = sound.Sound('A1.wav') b_sound = sound.Sound('B1.wav') items=0 right=0 wrong=0 Each frame: for stimulus in [image11, image22,image33,image44,image55,image66,image77,image88]: # check if the mouse is pressed within the current one: if mouse.isPressedIn(stimulus): thisExp.addData('items', 1) items=items+1 # Yes, so store the reaction time in the data thisExp.addData('RT', t) # check if the stimulus' image filename matches the correct answer: if stimulus.image == corrAns: a_sound.play() thisExp.addData('acc', 1) right=right+1 else: b_sound.play() thisExp.addData('acc', 0) thisExp.addData('wrong', 1) wrong=wrong+1 continueRoutine = False # end the trial once done here:
Please help me.
Thank you in advance.!