OS: Win10 PsychoPy version : 2021.1.2
**Standard Standalone? : y What are you trying to achieve?:
I’m trying to set the image stimuli condition of different levels(A,B,C) and also different types(1,2).
What I’d like to do is to present 6 stimuli of these combination (1,A), (1,B), (1,C), (2,A), (2,B), (2,C) among them in a random order, but every combination has to appear once.
However, as you can see, there are two stimuli images in each level for each type (for instance, row2 and row3 are both Type=1 & Level=1 stimuli).
I can’t figure it out how to randomly select one of those two stimuli for every combination, also in a random order.
It would be really helpful if anyone shares any idea about this…!
Thanks!!
I changed the spreadsheet like this below, but then how can I set the path of image ?
When there’s only one path, I could set up the image path like ‘$Path’.
In this case, I have two path columns and how should I assign the image path that corresponds to the random selection by code (path1 or path2) ?
Hello, thank you for the helpful message. What if you have more than 2 paths how would you change the code?
in my case,
6 for images:
(image1 image2, image3,… image6) and
6 for words:
(word1, word2,… word6)
I want to randomly select one of the images and one of the words and simultaneously show one image and one word on the screen.
This gives error : thisImage = image_list.append(image1, image2, image3, image4, image5, image6)
thisWord = word_list.append (word1, word2, word3, word4, word5, word6)
How am I going to define each column?
what is the image path for the Image component? what should I write there?
This gives error : thisImage = image_list.append(image1, image2, image3, image4, image5, image6)
thisWord = word_list.append (word1, word2, word3, word4, word5, word6)
How am I going to define each column?
what is the image path for the Image component? what should I write there?
I’m assuming that image1-image6 are names of your columns. That could include the path or you could add that in the code thisImage = 'images/'+image6+’.jpg’
Are you trying to set thisImage before you reach the loop pointing at your spreadsheet with a column called image6?
Since this topic has been solved, then I’d recommend that you start a new thread that refers back to it, with more detailed information of what you have tried if you want more support.