| Reference | Downloads | Github

Using different images as feedback

Hi all,

While I know that there have been related questions posted, I cannot seem to incorporate the responses into my code. In my task, the subjects are asked to make a same/different response to a set of two stimuli. Following each response, I want to show one of two images as feedback (smiley for correct, frowny for incorrect). My question has a few different elements.

  1. Do I need to use a .xlsx conditions file?
  2. Should the feedback stimulus be a single component that can switch between the two stim as necessary or, should each stim have its own component.

Currently, my two files are in the same directory as the script (smile.png and frown.png).

The script already accurately denotes correct vs. incorrect responses.

        if "escape" in theseKeys:
            endExpNow = True
        if len(theseKeys) > 0:  # at least one key was pressed
            if pResp.keys == []:  # then this was the first keypress
                pResp.keys = theseKeys[0]  # just the first key pressed
                pResp.rt = pResp.clock.getTime()
                # was this 'correct'?
                if (pResp.keys == str(PcorrectAns)) or (pResp.keys == PcorrectAns):
                    pResp.corr = 1
                    pResp.corr = 0

In the past, I have used colored lines as feedback and just added a line where I call the line where I have placed ** in the above text.

Any help on this would be greatly appreciated.


I figured it out, I apologize. I cannot figure out how to remove the post.