MCCS Beam Weight Store Implementation
The MccsBeamWeightStore is a Tango device that provides centralized storage and retrieval of beam weights for the SKA Low telescope. MCCS uses it to compute station phase centres during beam configuration and to determine per-antenna weights for beamforming.
The beam weight store is also used by OSO (Observatory Science Operations) to add and manage weights, and by TMC (Telescope Monitoring and Control) to calculate substation phase centres for generating geometric delays for the CBF (Correlator Beam Former). After calibration, attributes are updated with the applied phase centres [Thorn-198].
Currently, weights are the same for all stations, but there is one instance of the MccsBeamWeightStore per station to support future per-station weightings.
Key Features
Stores complex-valued weights for 256 antennas per station
Supports CRUD operations via Tango commands
Provides versioning of antenna weight recipes
Supports multiple weighting keys for different configurations
Backend-agnostic interface allows switching between implementations
Tango Commands
Command |
Description |
|---|---|
Insert |
Add new weights with a weighting key |
Update |
Modify existing weights |
Delete |
Remove weights by key |
Select |
Retrieve weights by key |
Contains |
Check if a weighting key exists |
GetIndices |
Get EEP indices for antennas |
GetWeightingKeys |
List all available weighting keys |
Architecture
The following figure shows a class diagram illustrating the MccsBeamWeightStore architecture.
The MccsBeamWeightStore has been implemented with two backend options:
Database Backend: Uses an SQL database for persistent storage
Telmodel Backend: Integrates with the telescope model database service
These are provided via the following main device and backend classes:
MccsBeamWeightStore: Tango device interfaceMccsBeamWeightStoreBackend: Abstract backend interfaceMccsBeamWeightStoreDatabaseBackend: SQL database implementationMccsBeamWeightStoreTelmodelBackend: Telmodel REST API implementation
The eventual aim is to use the Telmodel database service once it is properly deployed. However, the SQL backend is provided to enable use of the beam weight store in the meantime. The SQL backend will be used in deployment with the same Postgres database used by the MCCSCalibrationStore Tango device.
Usage in MCCS
Within MCCS, the beam weight store is used during beam configuration.
TMC provides configuration parameters, including a weighting_key_ref,
which is used during the station beam Configure command to query the
MccsBeamWeightStore for the appropriate weights.
These weights are combined with the BeamformerTable (set up during
Allocate and Configure commands) to compute per-channel, per-antenna
weights. The calculated weights are then applied to the SPS subsystem via
calibration coefficients.
Testing Convention
Weighting keys with the prefix thorn-test- are reserved for testing and
must never be used for production weighting data. This convention is
assisted by helpers in ska_low_mccs_common
(ska_low_mccs_common.beam_weight_store_client_utils and
ska_low_mccs_common.testing.beam_weight_store_testing_utils):
These helpers live in ska_low_mccs_common so that any repository that
depends on it shares a single definition of the reserved prefix. The
end-to-end tests that exercise a persistent deployment of
MccsBeamWeightStore live in the separate ska-low-mccs-hw-tests
repository; that suite is expected to import these helpers directly
(from ska_low_mccs_common.testing.beam_weight_store_testing_utils import
tmp_test_weighting_key, sweep_stale_test_weighting_keys, ...).
Testing against the production database via a reserved key prefix, rather than reconfiguring the deployment to point at a separate test backend, was not a trivial choice. It was determined a blast radius problem. Repointing the backend risks the reconfiguration never being reverted, leaving production silently pointed at a test backend. Testing against the production database directly risks polluting production data instead; the utilities above mitigate that risk by enforcing the reserved naming convention and only ever deleting entries that carry the prefix.
The calculatePhaseCentre command (currently unimplemented) will compute the
station phase centre, which is used by MCCS pointing algorithms for beam
steering.
A command flow diagram is provided below for reference:
System Integration
System |
Interaction with MccsBeamWeightStore |
|---|---|
MCCS |
Retrieves weights and calculates station phase centres and applies weights to the station beams on a per antenna per channel basis. |
OSO |
Adds/updates weights via API or device interface |
TMC |
Calculates substation phase centres to derive geometric delays for CBF |