I am trying to write an experiment that presents stimuli at random times, half of which are negative and the other half are neutral.
The trial type itself is been decided per row in the stimuli table. but instead of having to manually assign specific stimuli to specific row in the table I want the stimuli to be randomly selected from a list of negative or neutral images (according the the trial type).
My table has columns for trial type, and stimuli name (among other things)
This is the part of my code that initialize the images, and i am assuming that a good way to go about it is to add some if statement here, but i a not sure where, and how to refer to the variables from the table in this part of the code.
image_1 = visual.ImageStim( win=win, name='image_1', image='sin', mask=None, ori=0, pos=(0, 0), size=(1, 1), color=[1,1,1], colorSpace='rgb', opacity=1, flipHoriz=False, flipVert=False, texRes=128, interpolate=True, depth=-4.0)