Hello,
I have two ElementArrayStim stimuli: stimA and stimB.
I would like the window to alternate between stimA and stimB at a set frequency, that I can ideally hook into to execute code when the drawing is done.
What is the most precise and efficient way of accomplishing this?
The Code
# Create the stimuli
stimA = visual.ElementArrayStim(win, xys=xys, fieldPos=loc, colors=colorsA, ...
stimA.size = ...
stimB = visual.ElementArrayStim(win, xys=xys, fieldPos=loc, colors=colorsB, ...
stimB.size = ...
# Don't quit till user presses a key
while not event.getKeys():
# Draw the checkerboard
stimA.draw()
win.flip()