From: Ian Jackson Date: Wed, 29 Nov 2017 17:23:14 +0000 (+0000) Subject: helixish: better debug X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=097dfa54fc42e48114a05639a7f9052ee8c56f20;p=moebius3.git helixish: better debug Signed-off-by: Ian Jackson --- diff --git a/helixish.py b/helixish.py index 219ec35..5978478 100644 --- a/helixish.py +++ b/helixish.py @@ -164,7 +164,16 @@ class HelixishCurve(): findcurve_input = np.hstack((findcurve_target, findcurve_start, [findcurve_epsilon])) - dbg('RUNNING FINDCURVE', *findcurve_input) + + dbg(('RUNNING FINDCURVE ' + + ' target Q=[%5.2f %5.2f %5.2f] dQ=[%5.2f %5.2f %5.2f]') + % + tuple(findcurve_input[0:6])) + dbg(('s=%5.2f t=%5.2f la=%5.2f mu=%5.2f ga=%5.2f ka=%5.2f initial') + % + (( findcurve_input[6]**2, findcurve_input[7]**2 ) + + tuple(findcurve_input[8:12]))) + print(*findcurve_input, file=findcurve_subproc.stdin) findcurve_subproc.stdin.flush() @@ -173,11 +182,16 @@ class HelixishCurve(): while True: l = findcurve_subproc.stdout.readline() l = l.rstrip() - dbg('GOT ', l) + #dbg('GOT ', l) if not l: vdbg().crashing('findcurve EOF') l = eval(l) if l is None: break + dbg(('s=%5.2f t=%5.2f la=%5.2f mu=%5.2f ga=%5.2f ka=%5.2f' + + ' Q=[%5.2f %5.2f %5.2f] dQ=[%5.2f %5.2f %5.2f]') + % + (( l[0]**2, l[1]**2 ) + tuple(l[2:12]))) + hc.findcurve_result = l[0:6] hc.threshold = l[0]**2 hc.total_dist = hc.threshold + l[1]**2