Script to plot calibration times
authorDan White <dan@whiteaudio.com>
Tue, 4 Sep 2012 17:45:50 +0000 (12:45 -0500)
committerDan White <dan@whiteaudio.com>
Tue, 4 Sep 2012 17:45:50 +0000 (12:45 -0500)
python-lib/cal-times.py [new file with mode: 0644]

diff --git a/python-lib/cal-times.py b/python-lib/cal-times.py
new file mode 100644 (file)
index 0000000..a964951
--- /dev/null
@@ -0,0 +1,19 @@
+from glob import glob
+
+infiles = glob('*.npz')
+times = [s.split('_')[1][0:-4] for s in infiles]
+times = [3600*int(s[0:2]) + 60*int(s[2:4]) + int(s[4:]) for s in times]
+times.sort()
+dt = diff(times)
+
+# remove gaps
+#dt = [d for d in dt if d<150]
+
+plot(dt, 'o')
+ylim((0, 150))
+title('Calibration times')
+xlabel('Run number')
+ylabel('Time (s)')
+
+print len(dt)
+print 1.0*(dt[0]-dt[-1]) / dt[0]