Dear @Michael,
Thank you for your help, your suggestion works great overall!
However, I am facing a funny problem.
The Stimuli are now being presented in a random order within the 8 different blocks, which is great!
The pairing between fixation cross color and stimulus word is preserved across the 8 blocks for all stimuli EXCEPT for the one that has been presented as Stimulus 1 during Block 1.
So if the very first stimulus presented at the beginning of the experiment was “green fixation cross” + “dog”, during the second block it turns into “red fixation cross” + “dog”. As far as I have tested it, it stays “red”+“dog” until the last block.
When I check the logfile it seems like all pairs are matching (it shows consistently “red” + “dog” for all blocks, even for the first one) but when the experiment is running on the screen that is not the case, the first stimulus I see is “green” + “dog”.
Is it maybe a problem with the instructions I have put in the Color tab of my fixation cross textbox… ?
Thank you very much in advance!
V
Begin Experiment
wordsPhono = ['word 1', 'word 2', 'word 3', 'word 4', 'word 5', 'word 6', 'word 7', 'word 8', 'word 9', 'word 10', 'word 11', 'word12', 'word 13', 'word 14', 'word 15']
wordsSemantic = ['word 1', 'word 2', 'word 3', 'word 4', 'word 5', 'word 6', 'word 7', 'word 8', 'word 9', 'word 10', 'word 11', 'word12', 'word 13', 'word 14', 'word 15']
wordsNothing = ['word 1', 'word 2', 'word 3', 'word 4', 'word 5', 'word 6', 'word 7', 'word 8', 'word 9', 'word 10', 'word 11', 'word12', 'word 13', 'word 14', 'word 15']
np.random.shuffle(wordsPhono)
np.random.shuffle(wordsSemantic)
np.random.shuffle(wordsNothing)
#Select a sample of 10:
wordsPhono = wordsPhono[0:10]
wordsSemantic = wordsSemantic[0:10]
wordsNothing = wordsNothing[0:10]
FullStimList = wordsPhono + wordsSemantic + wordsNothing
#balanced, random order of fixation cross colours:
cross_colours = ['red', 'green'] * 15
np.random.shuffle(cross_colours)
stimuli = [{'colour':colour, 'word': word} for colour, word in zip(cross_colours, FullStimList)]
Begin Routine
if trials.thisN == (0): # only do this once per block
shuffle(stimuli)
trial_colour = stimuli[trials.thisN]['colour']
trial_word = stimuli[trials.thisN]['word']
thisExp.addData('StimOrder', stimuli[trials.thisN])
This is the TextBox component for the fixation cross:
This is the TextBox component for the word stimuli: