From: Dan White Date: Tue, 4 Sep 2012 17:45:50 +0000 (-0500) Subject: Script to plot calibration times X-Git-Tag: bootrom-initial-submission~98 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=eac3c59e7592979c9e3bed3bddb77da53162bb2f;p=430.git Script to plot calibration times --- diff --git a/python-lib/cal-times.py b/python-lib/cal-times.py new file mode 100644 index 0000000..a964951 --- /dev/null +++ b/python-lib/cal-times.py @@ -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]