From: W. Trevor King Date: Wed, 2 Jun 2010 05:21:31 +0000 (-0400) Subject: Flip deflection sign for hooke.driver.wtk. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0b7572e55936977d9ce91c0e0932939708776161;p=hooke.git Flip deflection sign for hooke.driver.wtk. We want +deflection for +chain tension. --- diff --git a/hooke/driver/wtk.py b/hooke/driver/wtk.py index 46bf92e..640f056 100644 --- a/hooke/driver/wtk.py +++ b/hooke/driver/wtk.py @@ -185,7 +185,11 @@ class WTKDriver (Driver): * info['z piezo sensitivity (m/V)'] ) - ret[:,d_scol] = ( + # 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_scol] = -( (data[:,d_rcol] * info['deflection sensitivity (V/bit)'] - info['deflection offset (V)'])