From 4295ec979a8f5dae1c14e02b97224b699617acee Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Fri, 9 Sep 2022 15:45:17 +0200 Subject: [PATCH] L2SS-881: rename tiles in antennas --- .../docs/source/devices/antennafield.rst | 2 +- .../source/devices/tilebeam-digitalbeam.rst | 4 ++-- .../devices/antennafield.py | 18 +++++++++--------- .../tangostationcontrol/devices/observation.py | 2 +- .../tangostationcontrol/devices/tilebeam.py | 2 +- .../default/devices/test_device_tilebeam.py | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tangostationcontrol/docs/source/devices/antennafield.rst b/tangostationcontrol/docs/source/devices/antennafield.rst index faac7ec5f..438b794a8 100644 --- a/tangostationcontrol/docs/source/devices/antennafield.rst +++ b/tangostationcontrol/docs/source/devices/antennafield.rst @@ -3,7 +3,7 @@ AntennaField The ``antennafield == DeviceProxy("STAT/AntennaField/1")`` device represents a set of *antennas* or *tiles* that collectively form an antenna field. It represents a selection of inputs from one or more ``RECV`` devices, annotated with metadata such as positional information. -:nr_tiles_R: The number of antennas or tiles in the antenna field. +:nr_antennas_R: The number of antennas or tiles in the antenna field. :type: ``uint32`` diff --git a/tangostationcontrol/docs/source/devices/tilebeam-digitalbeam.rst b/tangostationcontrol/docs/source/devices/tilebeam-digitalbeam.rst index 654337f35..c6701097b 100644 --- a/tangostationcontrol/docs/source/devices/tilebeam-digitalbeam.rst +++ b/tangostationcontrol/docs/source/devices/tilebeam-digitalbeam.rst @@ -24,7 +24,7 @@ Both devices beamform the antennas configured in its associated ``AntennaField`` - Beamforms HBA elements in the HBA tiles of its AntennaField device, - Uses ``antennafield.Antenna_Reference_ITRF_R`` as the reference position for each tile, - Allows a different pointing per HBA tile, - - ``N_output := antennafield.nr_tiles_R``, + - ``N_output := antennafield.nr_antennas_R``, - Uploads the computed weights to ``antennafield.HBAT_bf_delay_steps_RW``, - These weights are actually *delay steps* to be applied in the tile for each element. @@ -141,7 +141,7 @@ The following timers allow you to track the durations of each stage: DigitalBeam ````````````````````` -The DigitalBeam device applies the following configuration to compute each beamlet. Here, ``N_ant := antennafield.nr_tiles_R`` and ``N_beamlet := NUM_BEAMLETS == N_output``. +The DigitalBeam device applies the following configuration to compute each beamlet. Here, ``N_ant := antennafield.nr_antennas_R`` and ``N_beamlet := NUM_BEAMLETS == N_output``. :antenna_select_RW: Which beamlets to form with which antenna. ``True`` by default, except for antennas which are not mapped on any FPGA input (see "Configuration" below). diff --git a/tangostationcontrol/tangostationcontrol/devices/antennafield.py b/tangostationcontrol/tangostationcontrol/devices/antennafield.py index 1375a2053..d9ea40ea3 100644 --- a/tangostationcontrol/tangostationcontrol/devices/antennafield.py +++ b/tangostationcontrol/tangostationcontrol/devices/antennafield.py @@ -124,13 +124,13 @@ class AntennaField(lofar_device): ) Antenna_Reference_ITRF = device_property( - doc="ITRF position (XYZ) of each HBAT (leave empty to auto-derive from ETRS)", + doc="ITRF position (XYZ) of each Antenna (leave empty to auto-derive from ETRS)", dtype='DevVarFloatArray', mandatory=False ) Antenna_Reference_ETRS = device_property( - doc="ETRS position (XYZ) of each HBAT", + doc="ETRS position (XYZ) of each Antenna", dtype='DevVarFloatArray', mandatory=False ) @@ -177,14 +177,14 @@ class AntennaField(lofar_device): Power_to_RECV_mapping = device_property( dtype=(numpy.int32,), - doc='The mapping of HBAT power lines to RECV mapping. Each RECV can handle 96 inputs. The HBAT number is the index and the value shows to which receiver device it is connected and on which input. The first integer is the input. The second integer is the RECV id. Example: [0, 3] = first receiver of property RECV_devices with input 3. -1 means that the HBAT is not connected. The property is stored in a one dimensional structure. It needs to be reshaped to a list of lists of two items.', + doc='The mapping of Antenna power lines to RECV mapping. Each RECV can handle 96 inputs. The Antenna number is the index and the value shows to which receiver device it is connected and on which input. The first integer is the input. The second integer is the RECV id. Example: [0, 3] = first receiver of property RECV_devices with input 3. -1 means that the Antenna is not connected. The property is stored in a one dimensional structure. It needs to be reshaped to a list of lists of two items.', mandatory=False, default_value = [-1] * MAX_NUMBER_OF_HBAT * 2 ) Control_to_RECV_mapping = device_property( dtype=(numpy.int32,), - doc='The mapping of HBAT control lines to RECV mapping. Each RECV can handle 96 inputs. The HBAT number is the index and the value shows to which receiver device it is connected and on which input. The first integer is the input. The second interger is the RECV id. Example: [1, 3] = STAT/RECV/1 with input 3. -1 means that the HBAT is not connected. The property is stored in a one dimensional structure. It needs to be reshaped to a list of lists of two items.', + doc='The mapping of Antenna control lines to RECV mapping. Each RECV can handle 96 inputs. The Antenna number is the index and the value shows to which receiver device it is connected and on which input. The first integer is the input. The second interger is the RECV id. Example: [1, 3] = STAT/RECV/1 with input 3. -1 means that the Antenna is not connected. The property is stored in a one dimensional structure. It needs to be reshaped to a list of lists of two items.', mandatory=False, default_value = [-1] * MAX_NUMBER_OF_HBAT * 2 ) @@ -253,8 +253,8 @@ class AntennaField(lofar_device): doc='Absolute reference position of each tile, as geohash strings', dtype=(str,), max_dim_x=MAX_NUMBER_OF_HBAT,) - nr_tiles_R = attribute( - doc='Number of HBAT in this field', + nr_antennas_R = attribute( + doc='Number of Antennas in this field', dtype=numpy.int32) def read_Antenna_Names_R(self): @@ -273,8 +273,8 @@ class AntennaField(lofar_device): or (self.read_attribute('Antenna_Use_R')[n] == AntennaUse.AUTO and self.read_attribute('Antenna_Quality_R')[n] <= AntennaQuality.SUSPICIOUS)) return antenna_usage - def read_nr_tiles_R(self): - # The number of tiles should be equal to: + def read_nr_antennas_R(self): + # The number of antennas should be equal to: # * the number of elements in the Control_to_RECV_mapping (after reshaping), # * the number of elements in the Power_to_RECV_mapping (after reshaping), # * the number of antennas exposed through Antenna_Reference_ITRF_R. @@ -417,7 +417,7 @@ class AntennaField(lofar_device): # -------- @command(dtype_in=DevVarFloatArray, dtype_out=DevVarLongArray) def calculate_HBAT_bf_delay_steps(self, delays: numpy.ndarray): - num_tiles = self.read_nr_tiles_R() + num_tiles = self.read_nr_antennas_R() delays = delays.reshape(num_tiles, NUMBER_OF_ELEMENTS_PER_TILE) diff --git a/tangostationcontrol/tangostationcontrol/devices/observation.py b/tangostationcontrol/tangostationcontrol/devices/observation.py index 38ca5b36a..05d225a4b 100644 --- a/tangostationcontrol/tangostationcontrol/devices/observation.py +++ b/tangostationcontrol/tangostationcontrol/devices/observation.py @@ -141,7 +141,7 @@ class Observation(lofar_device): self.digitalbeam_proxy.antenna_select_RW = self._apply_saps_antenna_select(self.read_antenna_mask_R()) # Apply Tile Beam pointing direction - self.tilebeam_proxy.Pointing_direction_RW = [tuple(self.read_tile_beam_R())] * self.antennafield_proxy.nr_tiles_R + self.tilebeam_proxy.Pointing_direction_RW = [tuple(self.read_tile_beam_R())] * self.antennafield_proxy.nr_antennas_R logger.info(f"Started the observation with ID={self._observation_id}.") diff --git a/tangostationcontrol/tangostationcontrol/devices/tilebeam.py b/tangostationcontrol/tangostationcontrol/devices/tilebeam.py index 213d9cedc..75339492a 100644 --- a/tangostationcontrol/tangostationcontrol/devices/tilebeam.py +++ b/tangostationcontrol/tangostationcontrol/devices/tilebeam.py @@ -53,7 +53,7 @@ class TileBeam(beam_device): self.antennafield_proxy.set_source(DevSource.DEV) # We maintain the same number of tiles as the AntennaField - self._nr_tiles = self.antennafield_proxy.nr_tiles_R + self._nr_tiles = self.antennafield_proxy.nr_antennas_R super().configure_for_initialise(self._nr_tiles) # Retrieve positions from AntennaField device diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_tilebeam.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_tilebeam.py index 18eb04b9d..cfe5f4223 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_tilebeam.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_tilebeam.py @@ -55,7 +55,7 @@ class TestDeviceTileBeam(AbstractTestBases.TestDeviceBase): antennafield_proxy.boot() # check if AntennaField really exposes the expected number of tiles - self.assertEqual(self.NR_TILES, antennafield_proxy.nr_tiles_R) + self.assertEqual(self.NR_TILES, antennafield_proxy.nr_antennas_R) return antennafield_proxy def test_delays_dims(self): -- GitLab