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

L2SS-574: move signal-input-delays to RECV

parent 2f55cbb0
No related branches found
No related tags found
1 merge request!234Resolve L2SS-574 "Move hbat code to recv"
...@@ -36,11 +36,6 @@ class Beam(lofar_device): ...@@ -36,11 +36,6 @@ class Beam(lofar_device):
# ----------------- # -----------------
# Device Properties # Device Properties
# ----------------- # -----------------
HBAT_signal_input_delays = device_property(
dtype='DevVarFloatArray',
mandatory=False,
default_value = numpy.zeros((96,32), dtype=numpy.float64)
)
# ---------- # ----------
# Attributes # Attributes
...@@ -72,8 +67,10 @@ class Beam(lofar_device): ...@@ -72,8 +67,10 @@ class Beam(lofar_device):
self.recv_proxy = DeviceProxy("STAT/RECV/1") self.recv_proxy = DeviceProxy("STAT/RECV/1")
# Retrieve positions from RECV device # Retrieve positions from RECV device
self.hbat_reference_itrf = self.recv_proxy.get_hbat_reference_itrf().reshape(96,3) self.HBAT_reference_itrf = self.recv_proxy.get_hbat_reference_itrf().reshape(96,3)
self.hbat_antenna_itrf = self.recv_proxy.get_hbat_antenna_itrf().reshape(96,16,3) self.HBAT_antenna_itrf = self.recv_proxy.get_hbat_antenna_itrf().reshape(96,16,3)
# Retrieve signal delays from RECV device
self.HBAT_signal_input_delays = self.recv_proxy.get_hbat_signal_input_delays().reshape(96,32)
# -------- # --------
# internal functions # internal functions
...@@ -89,11 +86,11 @@ class Beam(lofar_device): ...@@ -89,11 +86,11 @@ class Beam(lofar_device):
for tile in range(96): for tile in range(96):
# initialise delay calculator # initialise delay calculator
d = delay_calculator(self.hbat_reference_itrf[tile]) d = delay_calculator(self.HBAT_reference_itrf[tile])
d.set_measure_time(timestamp) d.set_measure_time(timestamp)
# 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[tile] = d.convert(pointing_direction[tile], self.hbat_antenna_itrf[tile]) delays[tile] = d.convert(pointing_direction[tile], self.HBAT_antenna_itrf[tile])
return delays return delays
......
...@@ -74,18 +74,24 @@ class RECV(opcua_device): ...@@ -74,18 +74,24 @@ class RECV(opcua_device):
# ],dtype=numpy.float64) # ],dtype=numpy.float64)
# ) # )
hbat_reference_itrf = device_property( HBAT_reference_itrf = device_property(
dtype='DevVarFloatArray', dtype='DevVarFloatArray',
mandatory=False, mandatory=False,
default_value = numpy.tile(numpy.array([3826577.066, 461022.948, 5064892.786]),(96,1)) # CS002LBA, in ITRF2005 timestamp 2012.5 default_value = numpy.tile(numpy.array([3826577.066, 461022.948, 5064892.786]),(96,1)) # CS002LBA, in ITRF2005 timestamp 2012.5
) )
hbat_antenna_itrf = device_property( HBAT_antenna_itrf = device_property(
dtype='DevVarFloatArray', dtype='DevVarFloatArray',
mandatory=False, mandatory=False,
default_value = numpy.tile(numpy.array([3826923.546, 460915.441, 5064643.489]),(96,16,1)) # CS001LBA, in ITRF2005 timestamp 2012.5 default_value = numpy.tile(numpy.array([3826923.546, 460915.441, 5064643.489]),(96,16,1)) # CS001LBA, in ITRF2005 timestamp 2012.5
) )
HBAT_signal_input_delays = device_property(
dtype='DevVarFloatArray',
mandatory=False,
default_value = numpy.zeros((96,32), dtype=numpy.float64)
)
first_default_settings = [ first_default_settings = [
# set the masks first, as those filter any subsequent settings # set the masks first, as those filter any subsequent settings
'ANT_mask_RW', 'ANT_mask_RW',
...@@ -158,15 +164,22 @@ class RECV(opcua_device): ...@@ -158,15 +164,22 @@ class RECV(opcua_device):
@DebugIt() @DebugIt()
@only_in_states([DevState.ON]) @only_in_states([DevState.ON])
def get_hbat_reference_itrf(self): def get_hbat_reference_itrf(self):
""" Return the property hbat_reference_itrf (96x3) into a flatten array """ """ Return the property HBAT_reference_itrf (96x3) into a flatten array """
return self.hbat_reference_itrf.flatten() return self.HBAT_reference_itrf.flatten()
@command(dtype_out=DevVarFloatArray) @command(dtype_out=DevVarFloatArray)
@DebugIt() @DebugIt()
@only_in_states([DevState.ON]) @only_in_states([DevState.ON])
def get_hbat_antenna_itrf(self): def get_hbat_antenna_itrf(self):
""" Return the property hbat_antenna_itrf (96x16x3) into a flatten array """ """ Return the property HBAT_antenna_itrf (96x16x3) into a flatten array """
return self.hbat_antenna_itrf.flatten() return self.HBAT_antenna_itrf.flatten()
@command(dtype_out=DevVarFloatArray)
@DebugIt()
@only_in_states([DevState.ON])
def get_hbat_signal_input_delays(self):
""" Return the property HBAT_signal_input_delays (96x32) into a flatten array """
return self.HBAT_signal_input_delays.flatten()
@command() @command()
@DebugIt() @DebugIt()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment