From: W. Trevor King Date: Thu, 3 Jun 2010 14:07:11 +0000 (-0400) Subject: Flip deflection sign in picoforce driver so +deflection for +tension X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1784c60782f2a15dc9a19c1355bf763680c533fd;p=hooke.git Flip deflection sign in picoforce driver so +deflection for +tension --- diff --git a/hooke/driver/picoforce.py b/hooke/driver/picoforce.py index c1139d6..178574e 100644 --- a/hooke/driver/picoforce.py +++ b/hooke/driver/picoforce.py @@ -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)'])