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) :