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

Merge branch 'L2SS-480-delays-to-beam-weights' into L2SS-523-delay-calibration-table

parents 946101ea e1c6bb5f
No related branches found
No related tags found
1 merge request!227L2SS-523 "Add signal delay calibration table to BEAM"
...@@ -136,8 +136,8 @@ class Beam(lofar_device): ...@@ -136,8 +136,8 @@ class Beam(lofar_device):
# Record where we now point to, now that we've updated the weights. # Record where we now point to, now that we've updated the weights.
# Only the entries within the mask have been updated # Only the entries within the mask have been updated
mask = self.recv_proxy.RCU_mask_RW mask = self.recv_proxy.Ant_mask_RW.flatten()
for tile in range(32): for rcu in range(96):
if mask[tile]: if mask[tile]:
self._hbat_pointing_direction[tile] = pointing_direction[tile] self._hbat_pointing_direction[tile] = pointing_direction[tile]
self._hbat_pointing_timestamp[tile] = timestamp self._hbat_pointing_timestamp[tile] = timestamp
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
from tango import DevState from tango import DevState
from tango.test_context import DeviceTestContext from tango.test_context import DeviceTestContext
from tangostationcontrol.devices import beam from tangostationcontrol.devices import beam, lofar_device
import numpy import numpy
import mock import mock
...@@ -23,21 +23,13 @@ class TestBeamDevice(base.TestCase): ...@@ -23,21 +23,13 @@ class TestBeamDevice(base.TestCase):
def setUp(self): def setUp(self):
super(TestBeamDevice, self).setUp() super(TestBeamDevice, self).setUp()
# lofar_device init_device will launch a DeviceProxy not captured by
# the TestDeviceContext making it fail.
# Patch init_device and force match spec
init_patcher = mock.patch.object(
beam.Beam, 'init_device', spec=beam.Beam.init_device)
self.m_init = init_patcher.start()
self.addCleanup(init_patcher.stop)
# Patch DeviceProxy to allow making the proxies during initialisation # Patch DeviceProxy to allow making the proxies during initialisation
# that we otherwise avoid using # that we otherwise avoid using
proxy_patcher = mock.patch.object( for device in [beam, lofar_device]:
beam, 'DeviceProxy') proxy_patcher = mock.patch.object(
self.m_init = proxy_patcher.start() device, 'DeviceProxy')
self.addCleanup(proxy_patcher.stop) proxy_patcher.start()
self.addCleanup(proxy_patcher.stop)
def test_get_pointing_directions(self): def test_get_pointing_directions(self):
"""Verify can read pointings attribute and length matches without err""" """Verify can read pointings attribute and length matches without err"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment