Skip to content
Snippets Groups Projects
Commit 8494f1f0 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-937: update setup antennafield

parent 3f258cbe
No related branches found
No related tags found
1 merge request!424Resolve L2SS-937 "Restore recv cluster integration test"
......@@ -16,13 +16,15 @@ from tango import DevState
from tangostationcontrol.integration_test import base
from tangostationcontrol.integration_test.device_proxy import TestDeviceProxy
from tangostationcontrol.devices.antennafield import AntennaQuality, AntennaUse
logger = logging.getLogger()
class TestRecvCluster(base.IntegrationTestCase):
POINTING_DIRECTION = numpy.array([["J2000", "0deg", "0deg"]] * 96).flatten()
NR_TILES = 48
POINTING_DIRECTION = numpy.array([["J2000","0deg","0deg"]] * NR_TILES).flatten()
def setUp(self):
......@@ -48,10 +50,17 @@ class TestRecvCluster(base.IntegrationTestCase):
self.assertTrue(proxy.state() is DevState.ON)
for proxy in antenna_field_proxies:
proxy.off()
self.assertTrue(proxy.state() is DevState.OFF)
proxy.warm_boot()
proxy.set_defaults()
# setup AntennaField
NR_TILES = 48
antennafield_proxy = TestDeviceProxy(f"STAT/AntennaField/{i}")
control_mapping = [[1,i] for i in range(NR_TILES)]
antenna_qualities = numpy.array([AntennaQuality.OK] * 96)
antenna_use = numpy.array([AntennaUse.AUTO] * 96)
antennafield_proxy.put_property({"RECV_devices": [f"STAT/RECV/{i}"],
"Control_to_RECV_mapping": numpy.array(control_mapping).flatten(),
'Antenna_Quality': antenna_qualities, 'Antenna_Use': antenna_use})
antennafield_proxy.off()
antennafield_proxy.boot()
self.assertTrue(proxy.state() is DevState.ON)
for proxy in beam_proxies:
......@@ -59,6 +68,7 @@ class TestRecvCluster(base.IntegrationTestCase):
self.assertTrue(proxy.state() is DevState.OFF)
proxy.warm_boot()
proxy.set_defaults()
proxy.Tracking_enabled_RW = False
self.assertTrue(proxy.state() is DevState.ON)
results = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment