Dropping many frames: Spike triggered average

Hello, everyone!
I’m trying to Use the Psychopy for receptive field mapping, using spike triggered average method.
But, every time there are a lot of dropped frames.
I’m using the following code:

# Create screen
win = visual.Window(size=[280, 300],
                    fullscr=False,
                    screen=1,
                    allowGUI=False,
                    allowStencil=False,
                    monitor='testMonitor',
                    color=[-1, -1, -1],
                    colorSpace='rgb',
                    blendMode='avg',
                    useFBO=False,
                    waitBlanking=True)
# setting up for recording frames interval
win.recordFrameIntervals = True


# Open noise file
binary_matrix = np.load(FILE_WITH_NOISE)

# Binary stimulus
stimulus = visual.ImageStim(win, units='norm', size=[2, 2])

for trial in range(TRIALS):
    time_start = time.time()
    for mat_number in range(binary_matrix.shape[2]):
        stimulus.image = binary_matrix[:, :, mat_number]

        for frame in range(FRAME_NUM):
            stimulus.draw()
            win.flip()
    print(time.time() - time_start)

plt.figure()
plt.plot(win.frameIntervals)
plt.show()

frame_times_file = datetime.now().strftime("%Y%m%d-%H:%M")
win.saveFrameIntervals(fileName='STA_ft_' + frame_times_file + '.log')

win.close()

OS: win10
GPU: nvidia gtx 1060
RAM: 32 gb
CPU: core i7

Thank you!

Hi There,

I suspect the topic “spike triggered average” is a bit too specific for forum users to understand what the problem is and identify if they can help, so I hope you don’t mind me changing the topic here to attract more relevant community support.

If you open coder and select “demos >timing > timebyframes” what does the output of that look like? this will help determine if it is a code/stimulus issue or a hardware issue.

Thanks,
Becca

Hello,

did you turn off nvidia g-sync ready option? This allows the graphic card to dynamically adjust the frame-rate…

Best wishes Jens