Creating SART task - correct responses are being recorded as incorrect

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Mac
PsychoPy version (e.g. 1.84.x): v2021.1.4

What are you trying to achieve?:
I’m making a SART task where participants are presented with numbers from 1-9, and they either have to press the ‘space’ key after every number except 3, or press nothing after the number 3 for a correct response to be recorded, or else an incorrect response will be recorded

What did you try to make it work?:
A practice trial routine has been made with a text stimuli component ($Numbers), a mask component (‘X’), and a key response component (‘space’), with store correct answer on and Correct answer set as corrAns. This routine has been put on loop, setting loopType as random, nRep as 2, and Conditions as Conditions.xlxs.

In an excel sheet (Conditions.xlxs), I’ve created 3 parameters: Numbers, three, and corrAns. The Numbers column contains numbers 1-9. The three column has ‘no’ written beside all other numbers which are not 3, and ‘yes’ written beside the number 3 (I’m not sure if this parameter was necessary but I tried it without this parameter first and didn’t work). The corrAns column has an empty cell for number 3 (indicating no response), and space for every other number.
Screenshot 2021-11-11 at 16.39.30

What specifically went wrong when you tried that?:
The problem I’m having is that even when a correct response is given (no key is pressed when 3 is presented, or space is pressed when any other number is presented), it is recorded as incorrect.

In other words, even when the corrAns items match the key_resp_X responses in the data file, the key_resp_X.corr value is still 0.

Hope this problem makes sense. Thanks in advance!

Hi There,

I wonder if this demo might be helpful to you - it is a SART that follows your design but it is adapted to work with the mouse press/touch screen SART [PsychoPy] (files here Rebecca Hirst / SART · GitLab)

You could add a code component with the following that might help - in the End routine tab add:

correct = 0
if not key_resp.keys and corrAns == 'None':
    correct = 1
elif key_resp.keys == 'space' and corrAns == 'space':
   correct = 1

thisExp.addData('correct', correct)

You could need to change the empty space in your corrAns column to be None though

Hope this helps,

Hi Becca,

That code worked! And I’ll be sure to check out that demo for the rest of my experiment. Thank you so much!