From 411724b35d04a00a3c202950facc1b40a31a0c26 Mon Sep 17 00:00:00 2001
From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl>
Date: Wed, 3 Feb 2021 16:11:29 +0100
Subject: [PATCH] Got the total number of weights wrong

---
 SDP/SDP/SDP.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/SDP/SDP/SDP.py b/SDP/SDP/SDP.py
index c61e2ea7b..6eb2bf6bd 100644
--- a/SDP/SDP/SDP.py
+++ b/SDP/SDP/SDP.py
@@ -90,7 +90,7 @@ class SDP(Device):
     # ----------
     fpga_weights_R = attribute(
         dtype = ('DevBoolean',),
-        max_dim_x = 16 * 192 * 488,
+        max_dim_x = 16 * 12 * 488,
         #access=AttrWriteType.READ_WRITE,
     )
 
@@ -170,7 +170,7 @@ class SDP(Device):
 
         # Set default values in the RW/R attributes and add them to
         # the mapping.
-        self._fpga_weights_R = numpy.full(16 * 192 * 488, 0.0)
+        self._fpga_weights_R = numpy.full(16 * 12 * 488, 0.0)
         self.attribute_mapping["fpga_weights_R"] = {}
         self._fpga_mask_R = numpy.full(16, False)
         self.attribute_mapping["fpga_mask_R"] = {}
@@ -245,7 +245,7 @@ class SDP(Device):
         """Return the fpga_weights_R attribute."""
         value = numpy.array(self.attribute_mapping["fpga_weights_R"].get_value())
         fpgas = numpy.array(numpy.split(value, indices_or_sections = 16))
-        self._fpga_weights_R = numpy.array(numpy.split(fpgas, indices_or_sections = 192))
+        self._fpga_weights_R = numpy.array(numpy.split(fpgas, indices_or_sections = 12))
         return self._fpga_weights_R
 
     @only_when_on
-- 
GitLab