PsychoPy version: v2022.2.5
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?: I have designed an experiment and I want it to have 6 blocks with 12 trials each, and a screen that shows the subjects a message containing the number of blocks they have completed and the total points they have reached after the completion of each block (and ideally, also adding up the points of all the completed blocks).
This is the Builder view (you can see all the routines in the Routines window):
The experimental desing goes as follows: after the welcome & instructions screens, the subjects see a fixation cross, then the cue (that sets the reward condition - low or high - through its colour), then th ITI, and then the ‘Emotional_Stimuli’ routine appears. This routine contains 2 images of faces portraying emotional expressions. Subjects must choose which of them is more representative of the emotion. Then subjects must choose from within a list of options which emotion they think the pictures were showing. Depending on the reward condition and they answers, they get more or less points.
The ‘Initial_Routine’ contains a code component with:
import random, xlrd
in_file = ‘Photos.xlsx’
#number of items to load
num_items = 12
The ‘Block_Progress’ routine also contains a code component, meant for the screen with the progress, but it did not work.
What did you try to make it work?: Firstly, regarding the blocks, I have all the routines and loops, but I do not know whether I have to copy these 6 times or if there is another easier/faster way. My experiment is an incentivized facial emotion recognition task. I have tried setting the nReps of the loops to 6, but it didn’t work. And I don’t know how to set the trials to be 12. I also have the code in the ‘Initial_Routine’.
Regarding the screen showing the progress, I tried adding the ‘Block_Porgress’ routine, and a code component in it. As for the code snippet to include in this component, I asked ChatGPT, but its answers were making my experiment crash for diverse reasons (i.e., it created variables that had not been defined before they were called).
What specifically went wrong when you tried that?: I am just not being able to do these things or they make the experiment crash (if I use the code provided by ChatGPT).
Thank you in advance,