From ecacb0ad3a4aa33f13752fc5bfd13d6ba86e713d Mon Sep 17 00:00:00 2001 From: thijs snijder <snijder@astron.nl> Date: Tue, 8 Feb 2022 09:44:00 +0100 Subject: [PATCH] processed review issues --- .../tangostationcontrol/beam/test_delays.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/beam/test_delays.py b/tangostationcontrol/tangostationcontrol/beam/test_delays.py index dd141b903..2f74510e3 100644 --- a/tangostationcontrol/tangostationcontrol/beam/test_delays.py +++ b/tangostationcontrol/tangostationcontrol/beam/test_delays.py @@ -18,6 +18,8 @@ class TestAttributeTypes(base.TestCase): reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5 d = delay_calculator(reference_itrf) + self.assertIsNotNone(d) + def test_set_measure_time(self): # # create a frame tied to the reference position reference_itrf = [3826577.066, 461022.948, 5064892.786] # CS002LBA, in ITRF2005 epoch 2012.5 @@ -27,16 +29,13 @@ class TestAttributeTypes(base.TestCase): timestamp = datetime.datetime(2000, 1, 1, 0, 0, 5) d.set_measure_time(timestamp) + self.assertIsNotNone(d) def test_sun(self): # # 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 = 299792458.0 - antenna_itrf = [[reference_itrf[0], reference_itrf[1], reference_itrf[2]]] # CS001LBA, in ITRF2005 epoch 2012.5 - for i in range(24): # # set the timestamp to solve for timestamp = datetime.datetime(2022, 1, 27, i, 28, 0) # 9:28 sunrise this particular day @@ -51,8 +50,6 @@ class TestAttributeTypes(base.TestCase): pointing = d.measure.direction(*direction) dir = d.get_direction_vector(pointing) - print(f"time: {i:2}:28,\tdirection: {dir}") - self.assertTrue(0.98 <= sqrt(pow(dir[0],2) + pow(dir[1],2) + pow(dir[2],2)) <= 1.02) def test_identical_location(self): @@ -98,7 +95,6 @@ class TestAttributeTypes(base.TestCase): # calculate the delays based on the set reference position, the set time and now the set direction and antenna positions. delays = d.convert(direction, antenna_itrf) - print("One second delay: ", delays) self.assertTrue(0.98 <= delays[0] <= 1.02) -- GitLab