diff --git a/devices/devices/sdp/statistics_collector.py b/devices/devices/sdp/statistics_collector.py index fcf1f4b10e6c036cec3daf8cb9126c488d200370..84a4b669b730a3548de1da0307657e501ef0b957 100644 --- a/devices/devices/sdp/statistics_collector.py +++ b/devices/devices/sdp/statistics_collector.py @@ -165,7 +165,7 @@ class XSTCollector(StatisticsCollector): raise ValueError("Packet describes baselines starting at %s, but we require a multiple of BLOCK_LENGTH=%d" % (fields.first_baseline, self.MAX_INPUTS)) # Make sure we always have a baseline (a,b) with a>=b. If not, we swap the indices and mark that the data must be conjugated when processed. - first_baseline = fields.first_baseline[antenna] + first_baseline = fields.first_baseline if first_baseline[0] < first_baseline[1]: conjugated = True first_baseline = (first_baseline[1], first_baseline[0]) @@ -177,13 +177,10 @@ class XSTCollector(StatisticsCollector): # # we honour this format, as we want to keep the metadata together with these blocks. we do need to put the blocks in a linear # and tight order, however, so we calculate a block index. - block_index = baseline_index(fields.first_baseline[0] // self.BLOCK_LENGTH, fields.first_baseline[1] // self.BLOCK_LENGTH) + block_index = baseline_index(first_baseline[0] // self.BLOCK_LENGTH, first_baseline[1] // self.BLOCK_LENGTH) # process the packet self.parameters["nof_valid_payloads"][fields.gn_index] += numpy.uint64(1) - - block_index = baseline_index(fields.first_baseline[0], fields.first_baseline[1]) - self.parameters["xst_blocks"][block_index][:fields.nof_statistics_per_packet] = fields.payload self.parameters["xst_timestamps"][block_index] = numpy.float64(fields.timestamp().timestamp()) self.parameters["xst_conjugated"][block_index] = conjugated