I am creating a delay discounting task (choosing between an immediately-available smaller reward and a larger reward available after a delay) in PsychoPy. I have one routine for the task that is looped 51x and references an excel conditions file.
I am attempting to add a component that would present feedback on the participant’s choice. I want the feedback to state a message that would be specific to each of the 51 trials; it would need to reference information I have in a separate excel file.
For example, say I had normative data for 10 questions. I want the participant to select a choice on any one of those questions, and the subsequent feedback to state, “you made the same choice as X% of people who take this test.” I.e., the message would need to change along with the trial (and corresponding row of information in the conditions file).
I really hope I made sense and I’m sorry if not haha. Thank you for any and all help in advance. Obviously happy to clarify whatever – I’m a super noob to PsychoPy and a little bit of a luddite. The delay discounting task was simple to design, but I’m entirely lost on how to implement this specific-flavor of feedback.
I’m so sorry I do not understand. First, thank you so much for taking the time to respond and Im going to check out your demos! 2. I need randomization among the 51 discounting trials in each block, but for the 1 block that gives feedback, the feedback needs to reference information specific to the current trial the participant is engaging with at the moment. I am getting a pandas read excel file error, so Im going to try my experiment again on a windows computer in the next few days. however, my code is dubious even with the pandas error fixed.
I don’t know haha I’m very much a novice to the nth degree. How do you mean “use a loop”? In what regard? I do already have a randomized loop for each block of 51 discounting task trials.
I would upload my experiment file for reference, but can’t seem to be able to do so. Thank you again for your help! It’s really appreciated.
If you are already using a loop, what are you using pandas for?
If you have a conditions file which has one question per row and columns for the normative data for each answer, then you could do something like:
msg = "You made the same choice as "
if key_resp.keys == 'a':
msg += str(A)
elif key_resp.keys == 'b':
msg += str(B)
elif key_resp.keys == 'c':
msg += str(C)
msg += "% of people who take this test"
and then present $msg in the text component in the feedback routine.