I am trying to set up a PsychoPy experiment, first time all by myself.
Unfortunately, I am a total beginner when it comes to Python and programming.
Good thing is, I already have a working experiment template from a previous pilot study which I now need to change to my needs.
Major thing which needs to be included is: Participants should randomly be assigned to one of four different groups. The experiment consists of two phases: training phase and generalisation phase. Thus, when a participant was assigned to group 1 in the training phase, they have to be assigned to the same group in the generalisation phase.
I’ve created the files I need (excel & folder with pictures) for each group and each phase: so I have for example the files for TrainingG1 (group 1) containing the TrainingG1 excel file and the TrainingG1 zip-folder with the PNG files. Same goes for TrainingG2-4 and GeneralisationG1-4.
I know how to set up the experiment with Training & Generalisation phase for one group, but how can I add a “junction” so to say where the participants are randomly assigned one way (either group1, group2, group3, group4)?
Hey Jens and LuciaIglhaut,
two things:
Do you know of a way to group participants with non-numeric IDs? I am using Prolific (for the first time) and I believe they don’t use a simple incrementing number as ID.
and for Lucial:
once you used the Code of Jens, you need to use the variable (in this case stimfile) in the conditionsfile of a loop. like this: $stimfile
it is necissary, that all of the variables in the .xlsx are called the same and is kind of prone to errors.
that is correct. My code does not result in an even distribution of participants to all groups. I knew that. Your code results in an even distribution of participants to groups which is probably advantageous in most cases.