diff --git a/tangostationcontrol/tangostationcontrol/devices/antennafield.py b/tangostationcontrol/tangostationcontrol/devices/antennafield.py index a01b9b63785dd8f908bafcdc6e424805167ec3aa..d1c410321bdef9cc11152cfb46eb0ea84fb89de6 100644 --- a/tangostationcontrol/tangostationcontrol/devices/antennafield.py +++ b/tangostationcontrol/tangostationcontrol/devices/antennafield.py @@ -623,7 +623,7 @@ class AntennaField(LOFARDevice): ) RCU_PCB_version_R = MappedAttribute( "RCU_PCB_version_R", - dtype=((bool,),), + dtype=((str,),), max_dim_x=2, max_dim_y=MAX_ANTENNA, ) @@ -1614,6 +1614,8 @@ class AntennaToRecvMapper(object): "RCU_DTH_freq_R": (MAX_ANTENNA,), "RCU_DTH_freq_RW": (MAX_ANTENNA,), "RCU_DTH_on_R": (MAX_ANTENNA,), + "RCU_PCB_ID_R": (MAX_ANTENNA,), + "RCU_PCB_version_R": (MAX_ANTENNA,), } self._reshape_attributes_out = { "ANT_mask_RW": (N_rcu, N_rcu_inp), @@ -1631,6 +1633,13 @@ class AntennaToRecvMapper(object): "RCU_PCB_version_R": (N_rcu,), } + # Attributes which need to be reshaped with a copy of their values, + # because RECV original dimension < AntennaField mapped dimension + self._fill_attributes_in = { + "RCU_PCB_ID_R": N_rcu_inp, + "RCU_PCB_version_R": N_rcu_inp, + } + def map_read(self, mapped_attribute: str, recv_results: List[any]) -> List[any]: """Perform a mapped read for the attribute using the recv_results @@ -1643,6 +1652,11 @@ class AntennaToRecvMapper(object): default_values = self._default_value_mapping_read[mapped_attribute] + if mapped_attribute in self._fill_attributes_in: + recv_results = [ + [x] * self._fill_attributes_in[mapped_attribute] for x in recv_results + ] + if mapped_attribute in self._reshape_attributes_in: recv_results = numpy.reshape( recv_results,