Skip to content
Snippets Groups Projects
Commit f3ad287a authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'L2SS-2277-fix-xst-swap' into 'master'

L2SS-2277: Fix XST swap in gRPC

Closes L2SS-2277

See merge request !1078
parents 25abf4c8 8eccb84c
No related branches found
No related tags found
1 merge request!1078L2SS-2277: Fix XST swap in gRPC
Pipeline #114331 failed
Pipeline: tango

#114332

    ...@@ -150,6 +150,7 @@ Next change the version in the following places: ...@@ -150,6 +150,7 @@ Next change the version in the following places:
    through [https://git.astron.nl/lofar2.0/tango/-/tags](Deploy Tags) through [https://git.astron.nl/lofar2.0/tango/-/tags](Deploy Tags)
    # Release Notes # Release Notes
    * 0.48.1 Fix exposing correct triangle of XSTs in gRPC service
    * 0.48.0 Add Antennafield to gRPC server * 0.48.0 Add Antennafield to gRPC server
    * 0.47.2 Fix ZMQ hostname to subscribe to in gRPC server * 0.47.2 Fix ZMQ hostname to subscribe to in gRPC server
    * 0.47.1 Move GrafanaAPIV3 RPC interface to Opah repo * 0.47.1 Move GrafanaAPIV3 RPC interface to Opah repo
    ......
    0.47.2 0.48.1
    ...@@ -206,7 +206,7 @@ class Statistics(statistics_pb2_grpc.StatisticsServicer, LastStatisticsMessagesM ...@@ -206,7 +206,7 @@ class Statistics(statistics_pb2_grpc.StatisticsServicer, LastStatisticsMessagesM
    ) )
    for antenna1 in range(nr_antennas) for antenna1 in range(nr_antennas)
    for antenna2 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) frequency_band = self._message_to_frequency_band(xst_message)
    ......
    ...@@ -176,19 +176,27 @@ class TestStatistics(base.TestCase): ...@@ -176,19 +176,27 @@ class TestStatistics(base.TestCase):
    xst_message["integration_interval"], reply.result.integration_interval, 6 xst_message["integration_interval"], reply.result.integration_interval, 6
    ) )
    # verify all data is there # verify all baselines are there
    self.assertEqual( self.assertEqual(
    set( set(
    [ [
    (a, b) (a, b)
    for a in range(N_pn * A_pn) for a in range(N_pn * A_pn)
    for b 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]), 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 # verify data matches input
    xst_data = ( xst_data = (
    numpy.array(xst_message["xst_data_real"]) numpy.array(xst_message["xst_data_real"])
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment