From c7c1b3a02a2a0d460e6109292d4c3a35dc7bc456 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Aug 2010 07:56:41 -0400 Subject: [PATCH] Copy spring constant into block info in JPK driver. Although JPK's curve-level spring constant makes more sense. Perhaps I will convert all drivers to store it there in the future. --- hooke/driver/jpk.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hooke/driver/jpk.py b/hooke/driver/jpk.py index 30fabdf..800f78e 100644 --- a/hooke/driver/jpk.py +++ b/hooke/driver/jpk.py @@ -83,9 +83,12 @@ class JPKDriver (Driver): raise ValueError( 'No segment for %s in %s, only %s' % (name, path, [s.info['name'] for s in segments])) - return (segments, - self._zip_translate_params(zip_info, - segments[0].info['raw info'])) + curve_info = self._zip_translate_params(zip_info, + segments[0].info['raw info']) + for segment in segments: + segment.info['spring constant (N/m)'] = \ + curve_info['spring constant (N/m)'] + return (segments,curve_info) def _zip_info(self, zipfile): with Closing(zipfile.open('header.properties')) as f: -- 2.26.2