From 1784c60782f2a15dc9a19c1355bf763680c533fd Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 3 Jun 2010 10:07:11 -0400 Subject: [PATCH] Flip deflection sign in picoforce driver so +deflection for +tension --- hooke/driver/picoforce.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)']) -- 2.26.2