OS (e.g. Win10): Win 10
PsychoPy version (e.g. 1.84.x): 3.0.5
**Standard Standalone? **: y
What are you trying to achieve?:
In my task, participants must rate images and odors on a number of dimensions. I have everything set up, but a last minute change has left me puzzled.
Initially, participants would rate all images, and then all odors. I had two routines, each drawing from the same .csv file:
However, now ratings must alternate between images and odors so that a participant sees an image, then smells an odor, sees an image, etc.
I would still like to use two routines, one routine for images and one for odors. I also want to have one loop around both routines. So it would go Image routine x1, odor routine x 1, and then loop and start over. It would repeat this procedure 8 times:
I think the easiest way to do this would be to have one .csv file with images in one column, and odors in another column. Then, at the start of the experiment the .csv file would have each column shuffled separately. I have found some resources for a variety of ways to do this, but I have one difference the previous examples did not have: there are more than just these two columns tied to each routine. Therefore, I need a way to shuffle two groups of columns independently, while still preserving the order within the two groups.
For example, My .csv file has 8 columns, and 4 rows. Columns 1:4 are for image ratings, and Columns 5:8 are for odor ratings. I want to shuffle Columns 1:4 independently from Columns 5:8 without changing the within image order (Columns 1:4) or within odor order (Columns 5:8). That way, the image rating routine would draw random rows from Columns 1:4, and the olfactory rating routine would draw from Columns 5:8. But, these groups of columns would be reordered for each participant while preserving the order within each group of columns.
Any help would be greatly appreciated.