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

L2SS-881: rename tiles in antennas

parent 33fa73b7
No related branches found
No related tags found
1 merge request!410Resolve L2SS-881 "Add lba support"
......@@ -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``
......
......@@ -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).
......
......@@ -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)
......
......@@ -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}.")
......
......@@ -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
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment