diff --git a/README.md b/README.md index ff4ab2ddcac0f8037eece33e41d049b5549c03f9..f48ba03286b893c7773624aa30373d77891b4ebd 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Next change the version in the following places: through [https://git.astron.nl/lofar2.0/tango/-/tags](Deploy Tags) # Release Notes +* 0.48.1 Fix exposing correct triangle of XSTs in gRPC service * 0.48.0 Add Antennafield to gRPC server * 0.47.2 Fix ZMQ hostname to subscribe to in gRPC server * 0.47.1 Move GrafanaAPIV3 RPC interface to Opah repo diff --git a/tangostationcontrol/VERSION b/tangostationcontrol/VERSION index 55a0216801d7a2e7ccf8e2ce9d836bad6098cdec..cffa44cf335fc1a458f1dc8231602681bdf3e80d 100644 --- a/tangostationcontrol/VERSION +++ b/tangostationcontrol/VERSION @@ -1 +1 @@ -0.47.2 +0.48.1 diff --git a/tangostationcontrol/rpc/proxy/__init__.py b/tangostationcontrol/rpc/proxy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tangostationcontrol/rpc/statistics.py b/tangostationcontrol/rpc/statistics.py index c856c8f8e09de243246062ca15e57fcb47394da6..d164c67fc83e3e5c29a120a346884b3ac7a22eb2 100644 --- a/tangostationcontrol/rpc/statistics.py +++ b/tangostationcontrol/rpc/statistics.py @@ -206,7 +206,7 @@ class Statistics(statistics_pb2_grpc.StatisticsServicer, LastStatisticsMessagesM ) for antenna1 in range(nr_antennas) for antenna2 in range(nr_antennas) - if antenna1 <= antenna2 + if antenna2 <= antenna1 ] frequency_band = self._message_to_frequency_band(xst_message) diff --git a/tests/rpc/test_statistics.py b/tests/rpc/test_statistics.py index 7d2fd3ad942b7d6221275f830633c0a78aa5a3d7..d5d758f5385826cd7f023d94e7657d96fb992355 100644 --- a/tests/rpc/test_statistics.py +++ b/tests/rpc/test_statistics.py @@ -176,19 +176,27 @@ class TestStatistics(base.TestCase): xst_message["integration_interval"], reply.result.integration_interval, 6 ) - # verify all data is there + # verify all baselines are there self.assertEqual( set( [ (a, b) for a in range(N_pn * A_pn) for b in range(N_pn * A_pn) - if a <= b + if b <= a ] ), set([(b.antenna1, b.antenna2) for b in reply.result.baselines]), ) + # verify all baselines actually have data (and do not take data from + # the wrong half of the matrix that is filled with zeroes) + for b in reply.result.baselines: + self.assertNotEqual(0.0, b.xx.power_db, msg=f"{b}") + self.assertNotEqual(0.0, b.xy.power_db, msg=f"{b}") + self.assertNotEqual(0.0, b.yx.power_db, msg=f"{b}") + self.assertNotEqual(0.0, b.yy.power_db, msg=f"{b}") + # verify data matches input xst_data = ( numpy.array(xst_message["xst_data_real"])