Hi,
so i am trying to get my head around how i can solve the following problem.
I have coded an experiment with 5 conditions. Each condition has another type of stimulus. Therefore i have 5 stimuli folders and excel files. There is also a master excel file (exponenten.xlsx) which contains the 5 excel file names in the column “Exponent”. This is the actual condition file for the loop that randomizes the order of the 5 experimental conditions (loop_Exponenten).
In each condition participants are supposed to learn 4 randomly chosen stimuli out of 20 (the targets). These are saved in an object called “targets” which gets overwritten with every iteration of the condition loop (loop_Exponenten). After the learning phase (here: “Lernphase5s”), participants are going through a testing phase, where these stimuli (targets) and new ones (foils) are presented.
After loop_Exponenten i need to show all of the targets again to let participants rate them. I tried to use .append to get the line numbers in the respective excel sheet which works partially. All 20 line numbers are saved in this list (here: alletargets). I use “alletargets” in selected rows, “Exponent” in condition and “exponenten.xlsx” in another loop around that as the condition file. So it is just the same as in the learning phase, except for selected rows.
Unfortunately, because the line numbers of my 5 excel sheets are identical, my script shows all 20 targets corresponding to “alletargets” per condition.
Instead, it should only present the 4 targets per condition which were chosen before the learning phase. So 4x5 instead of 20x5.
Is there a way to use a function like .append to not only save the line numbers but the condition as well? Or maybe another solution?
I would be very grateful if anyone has an idea how i can solve my problem. Thanks!
(Win11, PsychoPy 2023.2.3)