From 1674e2a870de8445b1f3bc34528c2febfc1729ff Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 3 Jun 2009 15:22:41 -0400 Subject: [PATCH] Added EFILE debugging output to ExceptionTooClose case. --- unfold.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unfold.py b/unfold.py index fddcbde..1d8b586 100644 --- a/unfold.py +++ b/unfold.py @@ -136,18 +136,25 @@ class unfold : self.stepCloser() EFILE.write('step closer successful\n'); EFILE.flush() except ExceptionTooClose : + EFILE.write('caught ExceptionTooFar\n'); EFILE.flush() try : # try for a useful surface distance... if setpoint == None : # !HACK !redundant! assert rel_setpoint != None, "must have some sort of setpoint" setpoint = self.curDef() + rel_setpoint print "setpoint = %g" % setpoint + EFILE.write('attempt getSurfPos\n'); EFILE.flush() surfPos = self.getSurfPos(setpoint) + EFILE.write('getSurfPos succeeded\n'); EFILE.flush() print "Too close (surface at %g nm), stepping away" % surfPos except z_piezo_utils.poorFit, string : # ... oh well, print what we know + EFILE.write('getSurfPos failed\n'); EFILE.flush() print "Too close, stepping away" print "(Fit failed with: %s)" % string + EFILE.write('zero Z piezo\n'); EFILE.flush() self.zp.jumpToPos(self.zp.pos_nm2out(0)) + EFILE.write('step away\n'); EFILE.flush() self.stepAway() + EFILE.write('step away successful\n'); EFILE.flush() print "Too close, stepping away" return data def stepApproach(self, setpoint) : -- 2.26.2