diff --git a/tangostationcontrol/tangostationcontrol/statistics/reader.py b/tangostationcontrol/tangostationcontrol/statistics/reader.py index ef065ab8016ce9ca42de910c1c6d4438376245c3..20d3537edfa03d62ab6d6609e2342870cb62b52d 100644 --- a/tangostationcontrol/tangostationcontrol/statistics/reader.py +++ b/tangostationcontrol/tangostationcontrol/statistics/reader.py @@ -198,9 +198,10 @@ class statistics_data: # get SST specific stuff if self.marker == "S": - logger.debug(f"rcu_attenuator_dB: {file.get(f'{group_key}/rcu_attenuator_dB')}") - logger.debug(f"rcu_band_select: {file.get(f'{group_key}/rcu_band_select')}") - logger.debug(f"rcu_dth_on is: {file.get(f'{group_key}/rcu_dth_on')}") + + self.data_id_signal_input_index = file[group_key].attrs["data_id_signal_input_index"] + + # check if the dataset is empty or not. if empty, set to None, if not get the value if file.get(f'{group_key}/rcu_attenuator_dB').shape is None: self.rcu_attenuator_dB = None @@ -217,12 +218,6 @@ class statistics_data: else: self.rcu_dth_on = numpy.array(file.get(f"{group_key}/rcu_dth_on")) - - self.data_id_signal_input_index = file[group_key].attrs["data_id_signal_input_index"] - # self.rcu_attenuator_dB = numpy.array(file.get(f"{group_key}/rcu_attenuator_dB")) - # self.rcu_band_select = numpy.array(file.get(f"{group_key}/rcu_band_select")) - # self.rcu_dth_on = numpy.array(file.get(f"{group_key}/rcu_dth_on")) - # get XST specific stuff if self.marker == "X": self.data_id_subband_index = file[group_key].attrs["data_id_subband_index"] diff --git a/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py b/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py index a59a3841866be9b994d6d65875eb62c21336ba48..5f1d1b95ce59c8b7e9f069f27dfddc0d0236b55a 100644 --- a/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py +++ b/tangostationcontrol/tangostationcontrol/statistics/writer/hdf5.py @@ -318,7 +318,6 @@ class SstHdf5Writer(HDF5Writer): compression="gzip", ) except AttributeError: - logger.debug("set rcu_attenuator_dB_data to None") current_group.create_dataset( name="rcu_attenuator_dB", data=h5py.Empty("f"), @@ -331,7 +330,6 @@ class SstHdf5Writer(HDF5Writer): compression="gzip", ) except AttributeError: - logger.debug("set rcu_band_select_data to None") current_group.create_dataset( name="rcu_band_select", data=h5py.Empty("f"), @@ -344,7 +342,6 @@ class SstHdf5Writer(HDF5Writer): compression="gzip", ) except AttributeError: - logger.debug("set rcu_dth_on to None") current_group.create_dataset( name="rcu_dth_on", data=h5py.Empty("f"),