Skip to content
Snippets Groups Projects
Commit aaf9d78c authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-1460: Always apply Field Attenuation

parent 211f11d8
Branches
Tags v0.20.3
1 merge request!691L2SS-1460: Always apply Field Attenuation, do not make it disappear when only...
...@@ -115,6 +115,7 @@ Next change the version in the following places: ...@@ -115,6 +115,7 @@ Next change the version in the following places:
# Release Notes # Release Notes
* 0.20.3 Fix application of Field_Attenuation_R
* 0.20.2 Support only one parent in hierarchies * 0.20.2 Support only one parent in hierarchies
* 0.20.1 Create an abstract AntennaMapper class which implements behavior of both AntennaToSdpMapper * 0.20.1 Create an abstract AntennaMapper class which implements behavior of both AntennaToSdpMapper
and AntennaToRecvMapper and AntennaToRecvMapper
......
0.20.2 0.20.3
...@@ -182,6 +182,9 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase): ...@@ -182,6 +182,9 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase):
rcu_attenuator_db_pwr = self.antennafield_proxy.RCU_attenuator_dB_RW[:, 0] rcu_attenuator_db_pwr = self.antennafield_proxy.RCU_attenuator_dB_RW[:, 0]
rcu_attenuator_db_ctrl = self.antennafield_proxy.RCU_attenuator_dB_RW[:, 1] rcu_attenuator_db_ctrl = self.antennafield_proxy.RCU_attenuator_dB_RW[:, 1]
# gather settings
field_attenuation = self.antennafield_proxy.Field_Attenuation_R
for mapping_name, rcu_attenuator_db in [ for mapping_name, rcu_attenuator_db in [
("power", rcu_attenuator_db_pwr), ("power", rcu_attenuator_db_pwr),
("control", rcu_attenuator_db_ctrl), ("control", rcu_attenuator_db_ctrl),
...@@ -203,9 +206,9 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase): ...@@ -203,9 +206,9 @@ class TestCalibrationDevice(AbstractTestBases.TestDeviceBase):
rcu_attenuator_db[1], rcu_attenuator_db[1],
msg=f"{mapping_name} - rcu_attenuator_db={rcu_attenuator_db}", msg=f"{mapping_name} - rcu_attenuator_db={rcu_attenuator_db}",
) )
# longest cable should require no damping # longest cable should require no damping, so only field attenuation applies
self.assertEqual( self.assertEqual(
0, field_attenuation,
rcu_attenuator_db[1], rcu_attenuator_db[1],
msg=f"{mapping_name} - rcu_attenuator_db={rcu_attenuator_db}", msg=f"{mapping_name} - rcu_attenuator_db={rcu_attenuator_db}",
) )
......
...@@ -254,12 +254,16 @@ def calibrate_RCU_attenuator_dB(antenna_field: DeviceProxy): ...@@ -254,12 +254,16 @@ def calibrate_RCU_attenuator_dB(antenna_field: DeviceProxy):
# ----------------------------------------------------------- # -----------------------------------------------------------
# Correct for signal loss in the cables # Correct for signal loss in the cables
signal_delay_loss = ( signal_delay_loss = antenna_field.Antenna_Cables_Loss_R
antenna_field.Antenna_Cables_Loss_R - antenna_field.Field_Attenuation_R
)
# return coarse attenuation to apply # return coarse attenuation to apply (weakest signal
# gets 0 attenuation).
rcu_attenuator_db, _ = loss_compensation(signal_delay_loss) rcu_attenuator_db, _ = loss_compensation(signal_delay_loss)
# add field-wide attenuation
rcu_attenuator_db += antenna_field.Field_Attenuation_R
# apply on antenna field
antenna_field.RCU_attenuator_dB_RW = ( antenna_field.RCU_attenuator_dB_RW = (
numpy.tile( numpy.tile(
numpy.array(rcu_attenuator_db, dtype=numpy.int64).flatten(), numpy.array(rcu_attenuator_db, dtype=numpy.int64).flatten(),
......
...@@ -192,9 +192,9 @@ class AntennaField(LOFARDevice): ...@@ -192,9 +192,9 @@ class AntennaField(LOFARDevice):
Field_Attenuation = device_property( Field_Attenuation = device_property(
doc="Attenuation value to apply on all inputs.", doc="Attenuation value to apply on all inputs.",
dtype="DevFloat", dtype="DevShort",
mandatory=False, mandatory=False,
default_value=10.0, default_value=10,
) )
# ----- Position information # ----- Position information
...@@ -348,7 +348,7 @@ class AntennaField(LOFARDevice): ...@@ -348,7 +348,7 @@ class AntennaField(LOFARDevice):
@attribute( @attribute(
access=AttrWriteType.READ, access=AttrWriteType.READ,
dtype="DevFloat", dtype="DevShort",
) )
def Field_Attenuation_R(self): def Field_Attenuation_R(self):
return self.Field_Attenuation return self.Field_Attenuation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment