AFM._check_target_deflection doesn't have access to `setpoint` in volts.
authorW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:09:20 +0000 (16:09 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:09:20 +0000 (16:09 -0500)
pyafm/afm.py

index 3bceed5868671da19c0769eb9275e14306506bd0..75df11dd5f114412301806b1e938409cf4d31869 100644 (file)
@@ -154,14 +154,14 @@ class AFM (object):
         defc = self.piezo._deflection_channel()
         max_def = defc.get_maxdata()
         if deflection > max_def:
-            _LOG.error(('requested setpoint ({:g} V = {:d} bits) is larger '
-                        'than the maximum deflection value of {:d} bits'
-                        ).format(setpoint, deflection, max_def))
+            _LOG.error(('requested setpoint ({:d} bits) is larger than the '
+                        'maximum deflection value of {:d} bits'
+                        ).format(deflection, max_def))
             raise ValueError(setpoint)
         elif deflection < 0:
-            _LOG.error(('requested setpoint ({:g} V = {:d} bits) is less '
-                        'than the minimum deflection value of 0 bits'
-                        ).format(setpoint, deflection))
+            _LOG.error(('requested setpoint ({:d} bits) is less than the '
+                        'minimum deflection value of 0 bits'
+                        ).format(deflection))
             raise ValueError(setpoint)
 
     def _stepper_approach_again(self, target_deflection, min_slope_ratio, far):