Show me all the frame times that I recorded

Dear colleague

I am trying to identify all recorded frame times using ‘win.saveFrameIntervals(fileName=None, clear=True)’. I took this piece of code from the Detecting dropped frames PsychoPy webpage. After running the experiment, I was not able to find the lastFrameIntervals.log on my computer, so as a work around, I created a .txt. file and inserted the file path as shown below. Unfortunately, despite the experiment running as expected, no frame times were recorded.

# Setup the Window
win = visual.Window(
    size=(1920, 1080), fullscr=True, screen=0,
    allowGUI=False, allowStencil=False,
    monitor='B&WRm', color=[0,0,0], colorSpace='rgb',
    blendMode='avg', useFBO=True)
# store frame rate of monitor if we can measure it
expInfo['frameRate'] = win.getActualFrameRate()
if expInfo['frameRate'] != None:
    frameDur = 1.0 / round(expInfo['frameRate'])
else:
    frameDur = 1.0 / 60.0  # could not measure, so guess

win.saveFrameIntervals('C:/Test/one.csv', clear=True)

win.recordFrameIntervals = True
win.refreshThreshold = 1/60 + 0.004
logging.console.setLevel(logging.WARNING)

print('Overall, %i frames were dropped.' % win.nDroppedFrames)

I am a novice in Python, using v1.85.3 mainly in Builder view.

Many thanks in advance,

Claire

You want win.frameIntervals

Have a look at the timeByFrames demo (in the Coder view)