From 3a10210b2e7d5b2f21dd87768411d1f6481319a1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 8 Sep 2010 10:54:40 -0400 Subject: [PATCH] Extract 'z piezo sensitivity (m/V)' from JPK files into Curve.info. Not particularly important, since we convert from V to m inside the driver, but it's an interesting property for getting a feel for how a particular instrument works. --- hooke/driver/jpk.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hooke/driver/jpk.py b/hooke/driver/jpk.py index ee78f35..24d9777 100644 --- a/hooke/driver/jpk.py +++ b/hooke/driver/jpk.py @@ -160,9 +160,16 @@ class JPKDriver (Driver): assert force_base == 'distance', force_base dist_unit = chan_info['channel']['vDeflection']['conversion-set']['conversion']['distance']['scaling']['unit']['unit'] assert dist_unit == 'm', dist_unit + distance_base = chan_info['channel']['vDeflection']['conversion-set']['conversion']['distance']['base-calibration-slot'] + assert distance_base == 'volts', distance_base + # Assume volts unit is V, but it is not specified in the JPK + # file format. force_mult = float( chan_info['channel']['vDeflection']['conversion-set']['conversion']['force']['scaling']['multiplier']) + sens_mult = float( + chan_info['channel']['vDeflection']['conversion-set']['conversion']['distance']['scaling']['multiplier']) info['spring constant (N/m)'] = force_mult + info['z piezo sensitivity (m/V)'] = sens_mult return info def _zip_translate_segment_params(self, params): -- 2.26.2