From def5309bbb45c3ea0daf60f85811ad170e088305 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Thu, 7 Apr 2022 15:58:12 +0200 Subject: [PATCH] Fix off-by-one when processing XSTs --- .../tangostationcontrol/devices/sdp/statistics_collector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py index d8ac93d22..ca8fde912 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py @@ -188,7 +188,7 @@ class XSTCollector(StatisticsCollector): # check whether set of baselines in this packet are not out of bounds for antenna in (0,1): - if fields.first_baseline[antenna] + fields.nof_signal_inputs >= self.MAX_INPUTS: + if fields.first_baseline[antenna] + fields.nof_signal_inputs > self.MAX_INPUTS: # packet describes an input that is out of bounds for us raise ValueError(f"Packet describes {fields.nof_signal_inputs} x {fields.nof_signal_inputs} baselines starting at {fields.first_baseline}, but we are limited to describing MAX_INPUTS={self.MAX_INPUTS}") -- GitLab