From: W. Trevor King Date: Thu, 19 Aug 2010 11:56:41 +0000 (-0400) Subject: Copy spring constant into block info in JPK driver. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7c1b3a02a2a0d460e6109292d4c3a35dc7bc456;p=hooke.git 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. --- 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: