_LOG.debug('fine tune the stepper position')
while pos_m < -stepper_tolerance: # step back if we need to
- _LOG.debug('step back')
self.stepper.single_step(-1)
+ _LOG.debug('step back to {}'.format(self.stepper.position))
try:
pos = self.piezo.get_surface_position(
axis_name=self.config['main-axis'],
_LOG.debug('located surface at stepper %d, piezo %d (%g m)'
% (self.stepper.position, pos, pos_m))
while pos_m > stepper_tolerance: # step forward if we need to
- _LOG.debug('step forward')
self.stepper.single_step(1)
+ _LOG.debug('step forward to {}'.format(self.stepper.position))
try:
pos = self.piezo.get_surface_position(
axis_name=self.config['main-axis'],
except _SurfaceError, e:
_LOG.info(e)
self.stepper.single_step(-1) # step out
+ _LOG.debug('stepped back to {}'.format(self.stepper.position))
_LOG.debug('giving up on finding the surface')
_LOG.warn(e)
raise e