From 64379c8365c7712b98f68fda61af5a303becfb57 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Mon, 28 Feb 2022 13:15:21 +0100 Subject: [PATCH] L2SS-627: Linting: xix B008 Do not perform function calls in argument defaults. --- .../tangostationcontrol/devices/sdp/statistics_collector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py index 8c88a3a63..a54a8995f 100644 --- a/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/statistics_collector.py @@ -236,12 +236,15 @@ class XSTCollector(StatisticsCollector): self.parameters["xst_subbands"][subband_slot] = numpy.uint16(fields.subband_index) self.parameters["xst_integration_intervals"][subband_slot] = fields.integration_interval() - def xst_values(self, subband_indices=range(MAX_PARALLEL_SUBBANDS)): + def xst_values(self, subband_indices = None): """ xst_blocks, but as a matrix[len(subband_indices)][MAX_INPUTS][MAX_INPUTS] of complex values. The subband indices must be in [0..MAX_PARALLEL_SUBBANDS). By default, all recorded XSTs are returned. """ + if subband_indices is None: + subband_indices = range(MAX_PARALLEL_SUBBANDS) + matrix = numpy.zeros((len(subband_indices), self.MAX_INPUTS, self.MAX_INPUTS), dtype=numpy.complex64) xst_blocks = self.parameters["xst_blocks"] xst_conjugated = self.parameters["xst_conjugated"] -- GitLab