Hello all,
I need to present 5 categories of images with each category having 24 exemplars. The images are presented ina specific sequence. I achieved this by this code (see below) but the pop function only presentes an image once. I want to present each 24 images 4 times. SO 5 categories x 24 images x 4 times. How can I achieve replaying it 3 more times? Thank you for help.
Here is my code
BEGIN EXPERIMENT:
Faces = [f’Face_{i}.png’ for i in range(21,44)]
Scenes = [f’Scene_{i}.png’ for i in range(21,44)]
Bodies = [f’Body_{i}.png’ for i in range(21,44)]
Tools = [f’tool_{i}.png’ for i in range(21,44)]
Scrambled = [f’scrambled_{i}.tif’ for i in range(21,44)]
#randomize
shuffle(Faces)
shuffle(Scenes)
shuffle(Bodies)
shuffle(Tools)
shuffle(Scrambled)
BEGIN ROUTINE:
if Sequence == ‘F’:
image_file = Faces.pop()
elif Sequence == ‘S’:
image_file = Scenes.pop()
elif Sequence == ‘B’:
image_file = Bodies.pop()
elif Sequence == ‘Sr’:
image_file = Scrambled.pop()
elif Sequence == ‘T’:
image_file = Tools.pop()
thisExp.addData(‘image_file’, image_file)
The Sequence is defined in an excel file.
Thank you in advance