Skip to content
Snippets Groups Projects
Commit ff121d11 authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'fix-antenna-quality' into 'main'

Fix antenna quality

See merge request !91
parents c0eff802 5faced1b
No related branches found
No related tags found
1 merge request!91Fix antenna quality
Pipeline #84556 passed
......@@ -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
......
0.18.8
0.19.0
......@@ -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
......
......@@ -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] = {
......
......@@ -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
......
......@@ -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
......
# 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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment