cal_values = []
cal_outs = []
-N_RUNS = 8
-sample_runs = randint(48, size=(N_RUNS,))
+infiles = sorted(glob('*.npz'))
+N_RUNS = min(len(infiles), 8)
+sample_runs = randint(len(infiles), size=(N_RUNS,))
N_PLOTS = 4
sample_channels = sorted(randint(48, size=(N_PLOTS,)))
N_COLS = 4
nrun = 0
-for infile in sorted(glob('*.npz')):
+for infile in infiles:
+#for infile in sorted(glob('*.npz')):
#for infile in sorted(glob('2012-09-03_1*.npz')):
d = np.load(infile)
d.close() # close file descriptor
- if 1:
+ if nrun in sample_runs:
for i,k in enumerate(sample_channels):
- if nrun not in sample_runs:
- continue
g = guesses[:, 0, k]
r = 1e3*(2.5/2/2**13)*results[:, 0, k]