Hello all,
I’m running into a somewhat baffling problem regarding the timing of stimuli. I have a list of stimuli called streams (len(streams) is from 1-6) that are each presented accordingly (please note this is only the most relevant code to the problem, not the entirety of the experiment):
# Iterate over the letters in each stream and display them appropriately
for letters, T_nearby in trial.stream:
T_in_stream = "T" in letters
streams = reposition(streams, len(letters)) # Reposition each stimuli to the correct place
# Take every letter and assign it to a stimuli in streams. Then display the stimulus
for j in range(len(letters)):
stream = streams[j]
stream.text = letters[j]
if stream.status == NOT_STARTED and tThisFlipGlobal >= heads_up.tStopRefresh - frame_tolerance:
stream.status = STARTED
stream.tStartRefresh = tThisFlipGlobal
win.timeOnFlip(stream, "tStartRefresh")
stream.setAutoDraw(True)
if stream.status == STARTED:
if tThisFlipGlobal > stream.tStartRefresh + .4 - frame_tolerance: # 24 frames = 400 ms
stream.status = FINISHED
win.timeOnFlip(stream, "tStopRefresh")
stream.setAutoDraw(False)
if continueRoutine:
core.wait(0.4)
win.flip()
And here is a video of a few trials of the experiment being run:
I have several questions about the discrepancy between expected behavior from this code and actual behavior:
-
On some of these flips, the letters are not in sync when they change. How is this even possible, since they all should be drawn and redrawn on the same flip?
-
Similarly to 1, at the beginning of each stream only one letter shows at a time, then it eventually corrects to showing all letters. I have confirmed that the list of letters
letterscontains the appropriate amount of letters to be displayed each time, so I’m not sure why it only works some of the time -
Currently, the only reason the streams flip at .4s intervals is because of the
core.wait(0.4). The conditional afterif stream.status == STARTEDseems to have no effect on the times that the streams change. Why is this?
If needed, I can provide more context in both the code and what I am trying to achieve. I’m just not sure what all else is needed. Thanks in advance!