From 125eee4dc41f7468c58542e491337d941346151b Mon Sep 17 00:00:00 2001
From: thijs snijder <snijder@astron.nl>
Date: Fri, 21 Oct 2022 14:37:08 +0200
Subject: [PATCH] fixed constant use

---
 .../tangostationcontrol/devices/sdp/sdp.py                | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py
index ef0261464..6a2b25583 100644
--- a/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py
+++ b/tangostationcontrol/tangostationcontrol/devices/sdp/sdp.py
@@ -195,8 +195,8 @@ class SDP(opcua_device):
         value = numpy.array(value)
 
         # validate shape
-        if value.shape != (self.N_pn, self.S_pn):
-            raise ValueError(f"Dimension mismatch. Expected ({self.N_pn}, {self.S_pn}), got {value.shape}.")
+        if value.shape != (N_pn, S_pn):
+            raise ValueError(f"Dimension mismatch. Expected ({N_pn}, {S_pn}), got {value.shape}.")
 
         # validate content
         for val in value.flatten():
@@ -249,7 +249,7 @@ class SDP(opcua_device):
             raise ValueError(f"Unsupported clock frequency: {clock}")
 
         # Tell all FPGAs to use this clock
-        self.proxy.FPGA_pps_expected_cnt_RW = [clock] * self.N_pn
+        self.proxy.FPGA_pps_expected_cnt_RW = [clock] * N_pn
 
         # Also update the packet headers. We assume the first Nyquist zone of each FPGA is representative
         self.proxy.FPGA_sdp_info_nyquist_sampling_zone_index_RW = self._nyquist_zone(clock)[:,0]
@@ -291,7 +291,7 @@ class SDP(opcua_device):
         # Store which type of antenna is connected to each input.
         #
         # We need to be told this by AntennaField, through configure_for_antennafield.
-        self._antenna_type = numpy.array([["LBA"] * self.S_pn] * self.N_pn, dtype=str)
+        self._antenna_type = numpy.array([["LBA"] * S_pn] * N_pn, dtype=str)
 
     def _prepare_hardware(self):
         # FPGAs that are actually reachable and we care about
-- 
GitLab