Fix delection -> current_deflection typo in AFMPiezo.move_just_onto_surface().
authorW. Trevor King <wking@drexel.edu>
Fri, 16 Mar 2012 04:36:04 +0000 (00:36 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 16 Mar 2012 04:37:09 +0000 (00:37 -0400)
Also increase logging output, since I'm getting stuct in a loop here
for some reason.

pypiezo/afm.py

index 09f897677bc18426575c5885ac36adf7f928b57a..488caffff47fa40272753fb105e3cd4b30dfa5df 100644 (file)
@@ -213,7 +213,7 @@ class AFMPiezo (_base.Piezo):
             pos_array=[self.last_output[axis_name]]
         for i in range(pre_move_steps):
             self.jump(axis_name, piezo.last_output[axis_name])
-            delection = self.read_deflection()
+            current_deflection = self.read_deflection()
             if aquire_data:
                 def_array.append(current_deflection)
                 pos_array.append(self.last_output[axis_name])
@@ -231,8 +231,10 @@ class AFMPiezo (_base.Piezo):
             self.jump(axis_name, jump_to)
             current_deflection = self.read_deflection()
             log_string = (
-                'current z piezo position %6d, current deflection %6d'
-                % (current_deflection, self.last_output[axis_name]))
+                ('current z piezo position {:6d} (target {:6d}), '
+                 'current deflection {:6d} (target {:6d})').format(
+                    self.last_output[axis_name], position,
+                    current_deflection, deflection))
             _LOG.debug(log_string)
             if aquire_data:
                 def_array.append(current_deflection)