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
Branches
Tags
1 merge request!227L2SS-523 "Add signal delay calibration table to BEAM"
......@@ -136,8 +136,8 @@ class Beam(lofar_device):
# Record where we now point to, now that we've updated the weights.
# Only the entries within the mask have been updated
mask = self.recv_proxy.RCU_mask_RW
for tile in range(32):
mask = self.recv_proxy.Ant_mask_RW.flatten()
for rcu in range(96):
if mask[tile]:
self._hbat_pointing_direction[tile] = pointing_direction[tile]
self._hbat_pointing_timestamp[tile] = timestamp
......
......@@ -10,7 +10,7 @@
from tango import DevState
from tango.test_context import DeviceTestContext
from tangostationcontrol.devices import beam
from tangostationcontrol.devices import beam, lofar_device
import numpy
import mock
......@@ -23,20 +23,12 @@ class TestBeamDevice(base.TestCase):
def setUp(self):
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
# that we otherwise avoid using
for device in [beam, lofar_device]:
proxy_patcher = mock.patch.object(
beam, 'DeviceProxy')
self.m_init = proxy_patcher.start()
device, 'DeviceProxy')
proxy_patcher.start()
self.addCleanup(proxy_patcher.stop)
def test_get_pointing_directions(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment