Skip to content
Snippets Groups Projects
Commit 0af54fe8 authored by Taya Snijder's avatar Taya Snijder
Browse files

Merge branch 'L2SS-554_delay-pointing-unit-tests' of...

Merge branch 'L2SS-554_delay-pointing-unit-tests' of https://git.astron.nl/lofar2.0/tango into L2SS-554_delay-pointing-unit-tests
parents 60b608cc fb355ce6
No related branches found
No related tags found
1 merge request!229Resolve L2SS-554 "Delay pointing unit tests"
...@@ -9,7 +9,7 @@ from tangostationcontrol.test import base ...@@ -9,7 +9,7 @@ from tangostationcontrol.test import base
class TestAttributeTypes(base.TestCase): class TestDelays(base.TestCase):
def test_init(self): def test_init(self):
""" """
Fail condition is simply the object creation failing Fail condition is simply the object creation failing
...@@ -33,7 +33,7 @@ class TestAttributeTypes(base.TestCase): ...@@ -33,7 +33,7 @@ class TestAttributeTypes(base.TestCase):
# compute the delays for an antennas w.r.t. the reference position # compute the delays for an antennas w.r.t. the reference position
# # obtain the direction vector for a specific pointing # # obtain the direction vector for a specific pointing
direction = "SUN", "0deg", "0deg" direction = "J2000", "0deg", "0deg"
# calculate the delays based on the set reference position, the set time and now the set direction and antenna positions. # calculate the delays based on the set reference position, the set time and now the set direction and antenna positions.
pointing = d.measure.direction(*direction) pointing = d.measure.direction(*direction)
...@@ -47,7 +47,7 @@ class TestAttributeTypes(base.TestCase): ...@@ -47,7 +47,7 @@ class TestAttributeTypes(base.TestCase):
d = delay_calculator(reference_itrf) d = delay_calculator(reference_itrf)
# set the antenna position identical to the reference position # set the antenna position identical to the reference position
antenna_itrf = [reference_itrf] # CS001LBA, in ITRF2005 epoch 2012.5 antenna_itrf = [[reference_itrf[0], reference_itrf[1], reference_itrf[2]]] # CS001LBA, in ITRF2005 epoch 2012.5
# # set the timestamp to solve for # # set the timestamp to solve for
timestamp = datetime.datetime(2000, 1, 1, 0, 0, 0) timestamp = datetime.datetime(2000, 1, 1, 0, 0, 0)
...@@ -61,7 +61,7 @@ class TestAttributeTypes(base.TestCase): ...@@ -61,7 +61,7 @@ class TestAttributeTypes(base.TestCase):
# calculate the delays based on the set reference position, the set time and now the set direction and antenna positions. # 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) delays = d.convert(direction, antenna_itrf)
self.self.assertListEqual(delays == [0.0]) self.assertListEqual(delays, [0.0], msg=f"delays = {delays}")
def test_light_second_delay(self): def test_light_second_delay(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment