diff --git a/README.md b/README.md index c886fba47db2cb3afe03a0746459ae8ecb041424..8c65ffaca28f55c4e3c837c7a7253979a1a3b64a 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ tox -e debug tests.requests.test_prometheus ## Release notes +- 0.19.0 - Compatibility with tangostationcontrol 0.35.0: query Antenna_Status_R, which + replaced Antenna_Quality_str_R in tangostationcontrol 0.35.0. - 0.18.8 - Migrate case insensitive dict from station control - 0.18.7 - Add support for various ZeroMQ package receivers - 0.18.6 - Compatability with new black versions diff --git a/VERSION b/VERSION index 0f2596acd87483a7374c252cc9ff57e0a58b92ba..1cf0537c34385c81dd797cc51be2a589e17118e9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.18.8 +0.19.0 diff --git a/lofar_station_client/statistics/collectors/_xst.py b/lofar_station_client/statistics/collectors/_xst.py index c04510a604397451ce0c5702cf7898aa208e46c4..552f1b12107d5d2131fc79a7b81c3c7f78ea755a 100644 --- a/lofar_station_client/statistics/collectors/_xst.py +++ b/lofar_station_client/statistics/collectors/_xst.py @@ -44,7 +44,7 @@ class XSTCollector(StatisticsCollector): """ # Maximum number of subbands for which we collect XSTs simultaneously - MAX_PARALLEL_SUBBANDS = 8 + MAX_PARALLEL_SUBBANDS = 7 # Maximum number of antenna inputs we support (used to determine array sizes) MAX_INPUTS = 192 diff --git a/lofar_station_client/statistics/constants.py b/lofar_station_client/statistics/constants.py index eb11c84cdfcece8134cdd8747054ffc651b2434a..c1466c2d8f3a039324701e57215b85f6cb0e57e6 100644 --- a/lofar_station_client/statistics/constants.py +++ b/lofar_station_client/statistics/constants.py @@ -14,6 +14,7 @@ DEFAULT_STATISTICS_PORTS: Dict[str, Dict[str, int]] = { "HBA1": {"SST": 5121, "XST": 5122, "BST": 5123}, } + # Which TCP host each statistic is exposed on, # as DEFAULT_STATISTICS_HOST[mode]. DEFAULT_STATISTICS_HOSTS: Dict[str, str] = { diff --git a/lofar_station_client/statistics/writer/hdf5.py b/lofar_station_client/statistics/writer/hdf5.py index d62a1f0f6c19cfef5b6251bb3649f68e66bbedaa..90e9a5835689ba4da7ca9663f8d804ea2caaa411 100644 --- a/lofar_station_client/statistics/writer/hdf5.py +++ b/lofar_station_client/statistics/writer/hdf5.py @@ -235,9 +235,9 @@ class HDF5Writer(ABC): self.file.antenna_type = "HBA" if self.af_family == "AFH" else "LBA" 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 + self.file.antenna_quality = [ + s.name for s in self.antennafield_device.Antenna_Status_R + ] # noqa self.file.antenna_usage_mask = ( self.antennafield_device.Antenna_Usage_Mask_R ) # noqa diff --git a/tests/statistics/test_collector.py b/tests/statistics/test_collector.py index 90594199c815a34319d963089bb3928140dd5b54..65aeff5cf67c3d1644e3db19e1bd4c26e0e7e176 100644 --- a/tests/statistics/test_collector.py +++ b/tests/statistics/test_collector.py @@ -85,7 +85,7 @@ class TestXSTCollector(base.TestCase): self.assertEqual(fpga_index, collector.parameters["gn_indices"][0]) self.assertListEqual( - [102, 0, 0, 0, 0, 0, 0, 0], list(collector.parameters["xst_subbands"]) + [102, 0, 0, 0, 0, 0, 0], list(collector.parameters["xst_subbands"]) ) # check whether the data ended up in the right block, and the rest is still zero @@ -245,7 +245,7 @@ class TestXSTCollector(base.TestCase): # counters should now be updated self.assertListEqual( - [102, 103, 0, 0, 0, 0, 0, 0], list(collector.parameters["xst_subbands"]) + [102, 103, 0, 0, 0, 0, 0], list(collector.parameters["xst_subbands"]) ) # check whether the data ended up in the right block, and the rest is still diff --git a/tests/test_devices.py b/tests/test_devices.py index c647d4c6daef26681fa8dcafc99cd7a1b5227e8e..02fb62a35065b2fbd0ae77222f587090088d29f2 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -1,5 +1,6 @@ # Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: Apache-2.0 +from enum import Enum from unittest import mock from unittest.mock import MagicMock @@ -283,11 +284,14 @@ class RecvDeviceProxyTest(base.TestCase): class FakeAntennaFieldDeviceProxy: """DeviceProxy that mocks access to an AntennaField device.""" + class AntennaStatus(Enum): + OK = 0 + nr_antennas_R = 3 Antenna_to_SDP_Mapping_R = [[0, 0], [0, 1], [0, 2]] Antenna_Names_R = ["Aap", "Noot", "Mies"] Antenna_Reference_ITRF_R = [[0, 0, 0]] * nr_antennas_R - Antenna_Quality_str_R = ["OK"] * nr_antennas_R + Antenna_Status_R = [AntennaStatus.OK] * nr_antennas_R Antenna_Usage_Mask_R = [True] * nr_antennas_R Frequency_Band_RW = ["HBA_110_190"] * nr_antennas_R RCU_attenuator_dB_R = [0, 1, 2]