Last active
September 11, 2015 22:00
-
-
Save rkmaddox/2453d1a38bb246d10ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expyfun | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() | |
n_iter = 1000 | |
times = np.zeros(n_iter) | |
with expyfun.ExperimentController('wait_test', output_dir=None, participant='', | |
session='') as ec: | |
ec.wait_secs(0.5) | |
for ii in range(n_iter): | |
obj = expyfun.visual.Circle(ec, radius=(n_iter - float(ii)) / n_iter) | |
start = ec.current_time | |
obj.draw() | |
times[ii] = ec.current_time - start | |
#ec.flip() | |
plt.plot(1e3 * times, 'o') | |
plt.xlabel('Trial') | |
plt.ylabel('Timing delay (ms)') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment