From 9c2b3d4f2b4b2dc5ebecabec188f576ba39b85af Mon Sep 17 00:00:00 2001 From: devicerandom Date: Thu, 19 Jun 2008 17:47:35 +0000 Subject: [PATCH] (jpk.py) Added deflection, but a lot of things still behaving weirdly --- jpk.py | 21 +++++++++++++++------ picoforcealt.py | 2 -- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/jpk.py b/jpk.py index f7ba343..d83c17f 100644 --- a/jpk.py +++ b/jpk.py @@ -33,7 +33,7 @@ class jpkDriver(lhc.Driver): Of course, all other variables you like can be defined in the class. ''' self.filetype = 'jpk' - self.experiment = 'smfsz' + self.experiment = 'smfs' @@ -93,15 +93,24 @@ class jpkDriver(lhc.Driver): else: #we have measured no spring constant :( force=v_deflection - height_ms=[item*-1 for item in height_ms] - height_m=[item*-1 for item in height_m] - height=[item*-1 for item in height] + height_ms=DataChunk([item*-1 for item in height_ms]) + height_m=DataChunk([item*-1 for item in height_m]) + height=DataChunk([item*-1 for item in height]) + deflection=DataChunk(v_deflection) + force=DataChunk(force) - return DataChunk(height_ms),DataChunk(height_m),DataChunk(height),DataChunk(v_deflection),DataChunk(force) + return height_ms,height_m,height,deflection,force + + def deflection(self): + height_ms,height_m,height,deflection,force=self._read_data_segment() + deflection_ext=deflection.ext() + deflection_ret=deflection.ret() + deflection_ret.reverse() + return deflection_ext,deflection_ret def default_plots(self): - height_ms,height_m,height,v_deflection,force=self._read_data_segment() + height_ms,height_m,height,deflection,force=self._read_data_segment() height_ms_ext=height_ms.ext() height_ms_ret=height_ms.ret() diff --git a/picoforcealt.py b/picoforcealt.py index 9ae21f7..078430b 100644 --- a/picoforcealt.py +++ b/picoforcealt.py @@ -259,8 +259,6 @@ class picoforcealtDriver(lhc.Driver): ''' creates the default PlotObject ''' - - force=self._force() zdomain=self._Z() samples=self._get_samples_line() -- 2.26.2