From: Dan White Date: Sun, 2 Sep 2012 03:40:07 +0000 (-0500) Subject: save calibration loops always, no exceptions X-Git-Tag: calibrations~11 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=9ba008b075a08fe9acb40362a92254f1f3233f05;p=430.git save calibration loops always, no exceptions --- diff --git a/python-lib/calibrate.py b/python-lib/calibrate.py index d1c0c5b..7dd6631 100644 --- a/python-lib/calibrate.py +++ b/python-lib/calibrate.py @@ -134,14 +134,18 @@ def secant_opt(func, x0, limits, x1scale=0.1, maxiter=100, k=1.0): if not (sum(converging[0:N_CHANNELS]) > 0.0): return (p0, {'nevals': evaluations, 'guesses': guesses, - 'results': results}) + 'results': results, + 'converged': True}) p0 = p1 q0 = q1 p1 = p q1 = q - - raise Error("Failed to converge.") + return (p0, {'nevals': evaluations, + 'guesses': guesses, + 'results': results, + 'converged': False}) + #raise Error("Failed to converge.") @@ -271,7 +275,7 @@ adc.triggerMode(adc.MODE_MANUAL_MANUAL) -N_CHANNELS = 2 +N_CHANNELS = 48 N_SAMPLES = 10 DELAY = 0.05