unfolder: Save the timestamp, x-position, and temp under environment/
authorW. Trevor King <wking@tremily.us>
Thu, 7 Feb 2013 06:03:00 +0000 (01:03 -0500)
committerW. Trevor King <wking@tremily.us>
Thu, 7 Feb 2013 06:03:00 +0000 (01:03 -0500)
Keep the HDF5 root clean by moving these parameters under the
environment/ group.  Earlier versions of unfold-protein did not record
the x-position.

unfold_protein/unfolder.py

index 57def437eed744150ae91e4b380bfb5ebb95c207..cc5977ea1ddc64318e4f0ba03a31d31f5b054387 100755 (executable)
@@ -219,9 +219,12 @@ class Unfolder (object):
             storage.save(config=self.config, group=config_cwg)
             afm_piezo_cwg = _h5_create_group(config_cwg, 'afm/piezo')
             storage.save(config=self.afm.piezo.config, group=afm_piezo_cwg)
-            f['timestamp'] = timestamp
+            f['/environment/timestamp'] = timestamp
+            x_axis_name = 'x'
+            f['/environment/{}-position/data'.format(x_axis_name)
+              ] = self.afm.piezo.last_output[x_axis_name]
             if temperature is not None:
-                f['temperature'] = temperature
+                f['/environment/temperature'] = temperature
             for k,v in approach.items():
                 f['approach/{}'.format(k)] = v
             for k,v in unfold.items():