I am designing an experiment in which a fixation dot is always being presented. Then, during the experiment, stimuli are flashed at a certain rate on and off. For both fixation dot as well as stimuli, I use the autoDraw option, because I am drawing everything on individual frame flips for the most accurate timing. I am experiencing that the stimuli are always drawn over the fixation dot, so that it appears that the fixation dot also follows an on/off process. Specifically, now, either fixation dot is drawn, or the stimulus. What I actually want, is the fixation dot is always drawn (over the stimulus).
Is there a way to change the order of autoDraw stimuli?
In pseudo code, to illustrate the routine, my experiment is as follows:
window = visual.Window() fixdot = visual.GratingStim() stimulus = visual.ImageStim() fixdot.autoDraw = True for i_frame in range(n_frames): if i_frame % (on_frames + off_frames) == 0: stimulus.autoDraw = True elif i_frame % (on_frames + off_frames) == on_frames: stimulus.autoDraw = False window.flip() fixdot.autoDraw = False window.close()