Adding fMRI null events

First, you might find this thread relevant in general though not to these specific questions: Confusion about how to implement non-slip timing for trials with known end points

Yes. You can have a code component with something like this:

Before routine

countdownTimer = core.Clock()
countdownTimer.addTime(thisOrder_loop['time_presentation'])

Each frame

if countdownTimer.getTime() <= 0:
    continueRoutine = False

That code is fairly modular, you can kind of fit it in or around your existing code without too much difficulty.

There are a few different ways to do it.

One is to have something which sets the image autoDraw property of the images to False, which means it shouldn’t appear. You can put this in your Before Routine code but you may need to add it to the Each Frame code as well. If the fixation cross normally has an offset time, you could set the autoDraw property to True in the Each Frame code (or just call its draw() function directly in that code), which should override the duration time-out.

Another approach is to have an actual branching path where the fixation-only trial is a separate trial altogether. However, that might mess with your timing because there isn’t really a way to do it without creating an additional trial in the loop that will take up at least one frame. So I think for an fMRI experiment specifically it’s probably best to just have the one trial type and control what is or isn’t drawn in.