Hi All,
I’m trying to design an experiment, where in each trial I want to present two images and switch their location during the half way.
A part of my code now is:
if image_1.status == STARTED:
# is it time to stop? (based on global clock, using actual start)
if tThisFlipGlobal > image_1.tStartRefresh + 5-frameTolerance and tThisFlipGlobal <= image_1.tStartRefresh + 2.5-frameTolerance:
# keep track of stop time/frame for later
image_1.tStop = t # not accounting for scr refresh
image_1.frameNStop = frameN # exact frame index
win.timeOnFlip(image_1, 'tStopRefresh') # time at next scr refresh
image_1.setAutoDraw(False)
if tThisFlipGlobal > image_1.tStartRefresh + 2.5-frameTolerance:
image_1.setPos(-0.5,0)
image_1.tStop = t
image_1.frameNStop = frameN
win.timeOnFlip(image_1, 'tStopRefresh')
image_1.setAutoDraw(False)
However, the code cannot function well in the expected way. I am wondering whether anyone knows how to improve it to implement the desired function. Thanks in advance!