I am designing an experiment with few conditions by using builder. the experiment has few conditions
randomize the number variables
randomize the letter height of number shown.
Response when participants got the answer correctly.
My problem is the randomize the letter height. The letter height is shown in the condition file with number. However, the letter height did not randomize, it always paired with the randomized number.
I had attached few photos to have clearer picture:
I need to randomize the number and size, whereas corrAns is for the response set for participants. As you suggested that make combination in Excel-file and have that randomized by PsychoPy, may I have more details about how to execute this?
You need to more specific how you want to randomize numbers and sizes? The following example would show each number twice but each time in a different size
number
size
corrAns
1
0.05
space
2
0.05
space
3
0.07
space
4
0.07
space
5
0.2
space
6
0.3
space
7
0.5
space
8
0.8
space
9
1
space
1
1
space
2
0.8
space
3
0.5
space
4
0.3
space
5
0.2
space
6
0.07
space
7
0.07
space
8
0.05
space
9
0.05
space
Or do you simply want to present each number once but the size randomly assigned to it? Do all sizes have to appear?
In the “Begin routine” tab, put something like this to select the value for the current trial and make sure it is recorded in the data file (because it isn’t in the conditions file any more, you become responsible for manually recording it in the data):
size = sizes.pop()
thisExp.addData('size', size)
Make sure the code component appears above any stimulus component that wants to use the size variable, so that the latter gets access to the current value.
Thank you so much! The code is able to randomize the sizes now!
How about I would like to present the numbers more than once when I run the experiment? Like you have suggested, but the number would you in a random sequence and the sizes in a random sequence.
to show your numbers more than once, you simply increase the number of loop repetitions from 1 to x. x being the number of iterations. Do you intend to have a specific distribution of sizes and numbers? Should each number occur in each size or is this of no relevance?
You would also need to make the list of sizes grow by the same amount, as otherwise an error will occur when you try to pop the tenth size from the list, which is defined to only have 9 indices: