diff --git a/lofar_station_client/statistics/statistics_data.py b/lofar_station_client/statistics/statistics_data.py index 177f66af0a31d8e401b616424e3507f612327cdd..b7a99fa08a6a95f3503d4df33b381f05b8eb78c0 100644 --- a/lofar_station_client/statistics/statistics_data.py +++ b/lofar_station_client/statistics/statistics_data.py @@ -8,7 +8,7 @@ Models the structure of an HDF statistics file. """ import inspect -from typing import Dict +from typing import Dict, List from numpy import ndarray @@ -186,7 +186,7 @@ class StatisticsFileHeader: antenna_reference_itrf: str = attribute(optional=True) """ Absolute reference position of each tile, in ITRF (XYZ) """ - rcu_attenuator_db: [float] = attribute(name="rcu_attenuator_dB", optional=True) + rcu_attenuator_db: List[float] = attribute(name="rcu_attenuator_dB", optional=True) """ Amount of dB with which each antenna signal must be adjusted to line up. """ rcu_band_select: float = attribute(optional=True) @@ -201,7 +201,7 @@ class StatisticsFileHeader: fpga_firmware_version: str = attribute(optional=True) fpga_hardware_version: str = attribute(optional=True) - rcu_pcb_id: str = attribute(optional=True) + rcu_pcb_id: int = attribute(optional=True) rcu_pcb_version: str = attribute(optional=True) def __eq__(self, other): diff --git a/lofar_station_client/statistics/writer/hdf5.py b/lofar_station_client/statistics/writer/hdf5.py index be0880d6bdf43214405937391b0cc6520935ec48..db7008dee1c543d2e7c2a1a2e7d8bb26d73034b1 100644 --- a/lofar_station_client/statistics/writer/hdf5.py +++ b/lofar_station_client/statistics/writer/hdf5.py @@ -214,6 +214,8 @@ class HDF5Writer(ABC): self.file.rcu_band_select = self.antennafield_device.RCU_band_select_R self.file.rcu_dth_on = self.antennafield_device.RCU_DTH_on_R self.file.rcu_dth_freq = self.antennafield_device.RCU_DTH_freq_R + self.file.rcu_pcb_id = self.antennafield_device.RCU_PCB_ID_R + self.file.rcu_pcb_version = self.antennafield_device.RCU_PCB_version_R self.file.antenna_quality = ( self.antennafield_device.Antenna_Quality_str_R ) # noqa diff --git a/tests/statistics/test_writer.py b/tests/statistics/test_writer.py index d27f71f62cab2477c87194985e0405ad1fe798c6..aaa98007da4e29d4c8381731546c2d05969512c9 100644 --- a/tests/statistics/test_writer.py +++ b/tests/statistics/test_writer.py @@ -353,6 +353,8 @@ class TestStatisticsWriterXST(TestStatisticsReaderWriter): self.assertIn("rcu_band_select", dict(f.attrs)) self.assertIn("rcu_dth_on", dict(f.attrs)) self.assertIn("rcu_dth_freq", dict(f.attrs)) + self.assertIn("rcu_pcb_id", dict(f.attrs)) + self.assertIn("rcu_pcb_version", dict(f.attrs)) # check dataset dimensions, should match the number of antennas, # and cover both polarisations. diff --git a/tests/test_devices.py b/tests/test_devices.py index 8368fb630d414a65f149a2e9175065b7e3bc3be2..780a85cc93355e0fd5158543b6db835a68773586 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -285,6 +285,8 @@ class FakeAntennaFieldDeviceProxy: RCU_band_select_R = [1] * 3 RCU_DTH_on_R = [False] * 3 RCU_DTH_freq_R = [0.0] * 3 + RCU_PCB_ID_R = [[1, 1]] * 48 + RCU_PCB_version_R = [["version", "version"]] * 48 HBAT_PWR_on_R = [] Frequency_Band_R = []