From ad742f632c255f70646e2f9dbb7b8a704512361b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 20 Aug 2010 04:13:26 -0400 Subject: [PATCH] Set filetype and experiment fields in JPK driver. --- hooke/driver/jpk.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hooke/driver/jpk.py b/hooke/driver/jpk.py index 800f78e..1330713 100644 --- a/hooke/driver/jpk.py +++ b/hooke/driver/jpk.py @@ -88,7 +88,7 @@ class JPKDriver (Driver): for segment in segments: segment.info['spring constant (N/m)'] = \ curve_info['spring constant (N/m)'] - return (segments,curve_info) + return (segments, curve_info) def _zip_info(self, zipfile): with Closing(zipfile.open('header.properties')) as f: @@ -144,8 +144,16 @@ class JPKDriver (Driver): def _zip_translate_params(self, params, chan_info): info = { 'raw info':params, + 'filetype':self.name, #'time':self._time_from_TODO(raw_info[]), } + # TODO: distinguish between force clamp and velocity clamp + # experiments. Note that the JPK file format is flexible + # enough to support mixed experiments (i.e. both force clamp + # and velocity clamp segments in a single experiment), but I + # have no idea what sort of analysis such experiments would + # require ;). + info['experiment'] = experiment.VelocityClamp force_unit = chan_info['channel']['vDeflection']['conversion-set']['conversion']['force']['scaling']['unit']['unit'] assert force_unit == 'N', force_unit force_base = chan_info['channel']['vDeflection']['conversion-set']['conversion']['force']['base-calibration-slot'] -- 2.26.2