From a61bf005abc9a4e02968b9cac02af6a4badd0688 Mon Sep 17 00:00:00 2001 From: thijs snijder <snijder@astron.nl> Date: Tue, 22 Feb 2022 13:47:10 +0100 Subject: [PATCH] fied wrong speed of light and added annotation to function --- .../tangostationcontrol/test/beam/test_delays.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/test/beam/test_delays.py b/tangostationcontrol/tangostationcontrol/test/beam/test_delays.py index 1eb036b7d..4275b3e36 100644 --- a/tangostationcontrol/tangostationcontrol/test/beam/test_delays.py +++ b/tangostationcontrol/tangostationcontrol/test/beam/test_delays.py @@ -64,12 +64,16 @@ class TestAttributeTypes(base.TestCase): self.assertTrue(delays == [0.0]) def test_light_second_delay(self): + """ + This test measures the delay between 2 positions 1 light second apart. + """ + # # create a frame tied to the reference position reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5 d = delay_calculator(reference_itrf) # set the antenna position identical to the reference position - speed_of_light = 304389329.123#299792458.0 + speed_of_light = 299792458.0 antenna_itrf = [[reference_itrf[0], reference_itrf[1] - speed_of_light, reference_itrf[2]]] # CS001LBA, in ITRF2005 epoch 2012.5 # # set the timestamp to solve for @@ -85,5 +89,5 @@ class TestAttributeTypes(base.TestCase): delays = d.convert(direction, antenna_itrf) - self.assertTrue(0.98 <= delays[0] <= 1.02) + self.assertTrue(0.98 <= delays[0] <= 1.02, f"delays[0] = {delays[0]}") -- GitLab