From e7513c44f3e4cfbbd87d24e55b0f391b7b2ab80d Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Fri, 23 Sep 2022 15:13:43 +0200 Subject: [PATCH] L2SS-869: move querying into start_new_matrix procedure --- .../tangostationcontrol/statistics/writer/hdf5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py b/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py index 2ec3a7b2d..f1da6a4c5 100644 --- a/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py +++ b/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py @@ -120,9 +120,6 @@ class HDF5Writer(ABC): # grab the timestamp statistics_timestamp = statistics_packet.timestamp() - # query the device attributes for updated values - self.retrieve_attribute_values() - # ignore packets with no timestamp, as they indicate FPGA processing was # disabled and are useless anyway. if statistics_packet.block_serial_number == 0: @@ -173,6 +170,8 @@ class HDF5Writer(ABC): # write the finished (and checks if its the first matrix) if self.current_matrix is not None: try: + # query the device attributes for updated values + self.retrieve_attribute_values() self.write_matrix() except Exception as e: time = self.current_timestamp.strftime( @@ -191,6 +190,7 @@ class HDF5Writer(ABC): # create a new and empty current_matrix self.current_matrix = self.new_collector() self.statistics_header = None + self.device_attributes = {} def write_matrix(self): """Writes the finished matrix to the hdf5 file""" -- GitLab