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!