Flip deflection sign in picoforce driver so +deflection for +tension
authorW. Trevor King <wking@drexel.edu>
Thu, 3 Jun 2010 14:07:11 +0000 (10:07 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 3 Jun 2010 14:07:11 +0000 (10:07 -0400)
hooke/driver/picoforce.py

index c1139d6f5353fb1c71de954b8a78be0092ccf13d..178574e35a4a1c03dabbad927e58f4fa976d8f85 100644 (file)
@@ -343,7 +343,11 @@ class PicoForceDriver (Driver):
             * info['z piezo sensitivity (m/V)']
             )
 
-        ret[:,d_col] = (
+        # Leading '-' because deflection voltage increases as the tip
+        # moves away from the surface, but it makes more sense to me
+        # to have it increase as it moves toward the surface (positive
+        # tension on the protein chain).
+        ret[:,d_col] = -(
             (data[:,d_col]
              * info['deflection sensitivity (V/bit)']
              - info['deflection offset (V)'])