From 4070fef4322f5fa5dc2d17d4b56619c006975736 Mon Sep 17 00:00:00 2001
From: thijs snijder <snijder@astron.nl>
Date: Wed, 26 Oct 2022 11:51:25 +0200
Subject: [PATCH] corrected several contant usages

---
 .../default/devices/test_device_antennafield.py               | 2 +-
 .../tangostationcontrol/test/devices/test_recv_device.py      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py
index 08e244999..3835ab5c1 100644
--- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py
+++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_antennafield.py
@@ -21,7 +21,7 @@ class TestAntennaFieldDevice(AbstractTestBases.TestDeviceBase):
         super().setUp("STAT/AntennaField/1")
         self.proxy.put_property({
             "RECV_devices": ["STAT/RECV/1"],
-            "Power_to_RECV_mapping": [1, 1, 1, 0] + [-1] * (MAX_ANTENNA - 4)
+            "Power_to_RECV_mapping": [1, 1, 1, 0] + [-1] * ((DEFAULT_N_HBA_TILES * 2) - 4)
         })
         self.recv_proxy = self.setup_recv_proxy()
         self.sdp_proxy = self.setup_sdp_proxy()
diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py b/tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py
index 49102ab0c..1ce23d972 100644
--- a/tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py
+++ b/tangostationcontrol/tangostationcontrol/test/devices/test_recv_device.py
@@ -10,7 +10,7 @@
 from tango.test_context import DeviceTestContext
 
 from tangostationcontrol.devices import recv
-from tangostationcontrol.common.constants import MAX_ANTENNA, N_elements
+from tangostationcontrol.common.constants import N_rcu, N_rcu_inp, N_elements
 
 import numpy
 
@@ -29,7 +29,7 @@ class TestRecvDevice(device_base.DeviceTestCase):
     def test_calculate_HBAT_bf_delay_steps(self):
         """Verify HBAT beamforming calculations are correctly executed"""
         with DeviceTestContext(recv.RECV, properties=self.RECV_PROPERTIES, process=True) as proxy:
-            delays = numpy.random.rand(MAX_ANTENNA,N_elements).flatten()
+            delays = numpy.random.rand(N_rcu * N_rcu_inp,N_elements).flatten()
             HBAT_bf_delay_steps = proxy.calculate_HBAT_bf_delay_steps(delays)
             self.assertEqual(3072, len(HBAT_bf_delay_steps))                             # 96x32=3072
 
-- 
GitLab