Win10
PsychoPy v3.2.4
In the experiment I am trying to program, each participant will see 30 trials containing either “Type A” or “Type B” images. The sequence in which these “A” and “B” trials occur is fixed and should be the same for all participants, e.g.: A, B, A, A, B, A, B, B […]
For A trials, an image should be randomly drawn (without replacement throughout the experiment) from a folder containing A images, the same applies for B trials and a pool of B images.
I tried to solve this with two nested loops and three condition files: First I created a cond.csv file that looks like this:
sheets
A.csv
B.csv
A.csv
A.csv
B.csv
A.csv
B.csv
B.csv
[…]
The A.csv and B.csv each look like this with the path adjusted to A or B:
imagestim
A/img1.PNG
A/img2.PNG
A/img3.PNG
[…]
The outer loop is set to sequential and refers to the cond.csv file (so I would expect it to iterate through this list), the second loop is set to random and refers to $sheets instead of a file. Then, a routine which contains an image stimulus refers to $imagestim to present the images.The Variable nReps is set to 1 for both loops.
When I run this, each file listing images is looped through entirely before exiting the inner loop and moving on to the outer loop again. However, what I want is a random pick of just 1 stimulus from one of the two lists, depending on the position of the outer loop. Can this be done in the builder or should I change it in the code directly?
Any help is appreciated!