psychopy.org | Reference | Downloads | Github

Feedback Sum up multiable sets of trials

Hello there,

I am new to Psychopy and I have run into a problem constructing my project. I will list the core elements of it.

During the experiment, 5 images shall be presented. the participants are asked to rate the images if they are 2D or 3D. the Between subjects Factor is Instructions (3 different in total) and the within-subjects factor is presentation time of the images (1 vs 3 seconds). Both Factors have separate loops to them.

The experiment works perfectly fine until the last routine “Final Feedback”
the aim is to show total scores of correct answers for each Factor
While it works for the between Factor it does not for the Within Factor

the code I used to to sum up the total score of the Within Factor:
corrTotal3 = Stimuluspresentation.data[‘Image_Key’].sum()

corrTotal4=f’ In round 2 you have earned a total of {str(corrTotal3)} of 30 points!’ is the text that will appear in the final feedback.

However, if I only click the 3D images correctly I should have a total of 18 points but I always get 9 so I assume Psychopy only sums up one given condition (1 second OR 3 seconds) but not both together.

How can I make sure that both conditions are summed up in one score correctly?