Removed redundant picoforcealt driver
[hooke.git] / hooke / driver / wtk.py
index 46bf92e5c57a0a73cd674e71c4e6340a73ece08e..45f0946dc906c5ddffdaafa6dc2c4730f8a335d0 100644 (file)
@@ -16,7 +16,7 @@
 # License along with Hooke.  If not, see
 # <http://www.gnu.org/licenses/>.
 
-"""Hooke driver for W. Trevor King's velocity clamp data format.
+"""Driver for W. Trevor King's velocity clamp data format.
 
 See my related projects:
 
@@ -96,7 +96,7 @@ class WTKDriver (Driver):
             unlabeled_approach_data, params, 'approach')
         retract = self._scale_block(
             unlabeled_retract_data, params, 'retract')
-        info = {'filetype':'wtk', 'experiment':experiment.VelocityClamp}
+        info = {'filetype':self.name, 'experiment':experiment.VelocityClamp}
         return ([approach, retract], info)
 
     def _paths(self, path):
@@ -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)'])
@@ -244,7 +248,7 @@ class WTKDriver (Driver):
             if self._calibfile_timestamp(calibfiles[i]) > timestamp:
                 i -= 1
                 break
-        return os.path.join(dir, calibfiles[i])
+        return calibfiles[i]
 
     def _read_cantilever_calibration_file(self, filename):
         ret = {'file': filename}