Skip to content
Snippets Groups Projects
Commit 54458772 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

Merge branch 'L2SS-1201-rcu-id-in-hdf5-header' into 'main'

L2SS-1201: add rcu-id and rcu-version

Closes L2SS-1201

See merge request !40
parents 739ee1ed 80007590
No related branches found
No related tags found
1 merge request!40L2SS-1201: add rcu-id and rcu-version
Pipeline #45257 failed
......@@ -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):
......
......@@ -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
......
......@@ -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.
......
......@@ -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 = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment