From 328445f5e5fdea420794d8d7f6793b05ffcf5940 Mon Sep 17 00:00:00 2001 From: Dan White Date: Tue, 4 Sep 2012 13:00:56 -0500 Subject: [PATCH] Fix stats script to pick last real measured Voos --- python-lib/test-data/chip02/stats.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/python-lib/test-data/chip02/stats.py b/python-lib/test-data/chip02/stats.py index b826a03..b00fa3b 100644 --- a/python-lib/test-data/chip02/stats.py +++ b/python-lib/test-data/chip02/stats.py @@ -45,7 +45,16 @@ for infile in infiles: plot(r[:nevals[0,k]+1], '-') cal_values.append(guesses[-1, :, :]) - cal_outs.append(results[-1, :, :]) + + # results are zeros after [nevals:] + # pick off the last real measurement + r = zeros_like(results[-1, :, :]) + for i in range(r.shape[0]): + for j in range(r.shape[1]): + r[i, j] = results[nevals[i,j]-1, i, j] + cal_outs.append(r) + + #cal_outs.append(results[-1, :, :]) nrun += 1 cv = array(cal_values) @@ -62,10 +71,10 @@ for i,k in enumerate(sample_channels): data = 1e3*(2.5/2/2**13)*co[:, 0, k] dm = max((abs(data.min()), abs(data.max()))) print dm - dm = 50 + dm = max(dm, 50) hist(data, bins=100, range=(-dm, dm), align='left') xlim((-dm, dm)) - ylim((0, 50)) + #ylim((0, 50)) subplot(N_PLOTS, N_COLS, 1) title('Offset DAC value') -- 2.25.1