Skip to content
Snippets Groups Projects
Commit e55ff6e0 authored by Taya Snijder's avatar Taya Snijder
Browse files

polished the code a bit

parent 2a5cd492
No related branches found
No related tags found
1 merge request!421Resolve L2SS-920 "Make statistics writer tolerant"
...@@ -198,9 +198,10 @@ class statistics_data: ...@@ -198,9 +198,10 @@ class statistics_data:
# get SST specific stuff # get SST specific stuff
if self.marker == "S": 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')}") self.data_id_signal_input_index = file[group_key].attrs["data_id_signal_input_index"]
logger.debug(f"rcu_dth_on is: {file.get(f'{group_key}/rcu_dth_on')}")
# 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: if file.get(f'{group_key}/rcu_attenuator_dB').shape is None:
self.rcu_attenuator_dB = None self.rcu_attenuator_dB = None
...@@ -217,12 +218,6 @@ class statistics_data: ...@@ -217,12 +218,6 @@ class statistics_data:
else: else:
self.rcu_dth_on = numpy.array(file.get(f"{group_key}/rcu_dth_on")) 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 # get XST specific stuff
if self.marker == "X": if self.marker == "X":
self.data_id_subband_index = file[group_key].attrs["data_id_subband_index"] self.data_id_subband_index = file[group_key].attrs["data_id_subband_index"]
......
...@@ -318,7 +318,6 @@ class SstHdf5Writer(HDF5Writer): ...@@ -318,7 +318,6 @@ class SstHdf5Writer(HDF5Writer):
compression="gzip", compression="gzip",
) )
except AttributeError: except AttributeError:
logger.debug("set rcu_attenuator_dB_data to None")
current_group.create_dataset( current_group.create_dataset(
name="rcu_attenuator_dB", name="rcu_attenuator_dB",
data=h5py.Empty("f"), data=h5py.Empty("f"),
...@@ -331,7 +330,6 @@ class SstHdf5Writer(HDF5Writer): ...@@ -331,7 +330,6 @@ class SstHdf5Writer(HDF5Writer):
compression="gzip", compression="gzip",
) )
except AttributeError: except AttributeError:
logger.debug("set rcu_band_select_data to None")
current_group.create_dataset( current_group.create_dataset(
name="rcu_band_select", name="rcu_band_select",
data=h5py.Empty("f"), data=h5py.Empty("f"),
...@@ -344,7 +342,6 @@ class SstHdf5Writer(HDF5Writer): ...@@ -344,7 +342,6 @@ class SstHdf5Writer(HDF5Writer):
compression="gzip", compression="gzip",
) )
except AttributeError: except AttributeError:
logger.debug("set rcu_dth_on to None")
current_group.create_dataset( current_group.create_dataset(
name="rcu_dth_on", name="rcu_dth_on",
data=h5py.Empty("f"), data=h5py.Empty("f"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment