From: W. Trevor King Date: Wed, 3 Jun 2009 19:22:41 +0000 (-0400) Subject: Added EFILE debugging output to ExceptionTooClose case. X-Git-Tag: v0.2~31 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1674e2a870de8445b1f3bc34528c2febfc1729ff;p=unfold-protein.git Added EFILE debugging output to ExceptionTooClose case. --- 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) :