From f7ee05cd5cd1e449d12759d0caed54c56c4e3783 Mon Sep 17 00:00:00 2001 From: John Stowers Date: Sat, 15 May 2021 08:24:26 +1200 Subject: [PATCH] fictrac: also log version --- flyvr/fictrac/fictrac_driver.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flyvr/fictrac/fictrac_driver.py b/flyvr/fictrac/fictrac_driver.py index 7e021992..d5f68557 100644 --- a/flyvr/fictrac/fictrac_driver.py +++ b/flyvr/fictrac/fictrac_driver.py @@ -14,6 +14,9 @@ SHMEMFicTracState, fictrac_state_to_vec, NUM_FICTRAC_FIELDS +H5_DATA_VERSION = 1 + + class FicTracDriver(object): """ This class drives the tracking of the fly via a separate software called FicTrac. It invokes this process and @@ -88,6 +91,9 @@ def run(self, options): flyvr_shared_state.logger.create("/fictrac/output", shape=[2048, NUM_FICTRAC_FIELDS], maxshape=[None, NUM_FICTRAC_FIELDS], dtype=np.float64, chunks=(2048, NUM_FICTRAC_FIELDS)) + flyvr_shared_state.logger.log("/fictrac/output", + H5_DATA_VERSION, + attribute_name='__version') # Start FicTrac with open(self.console_output_file, "wb") as out: