Beam Weight Store Backend
This module provides a backend to connect to telmodel for the Beam Weight Store.
- class MccsBeamWeightStoreBackend(*args, **kwargs)[source]
The MCCS Beam Weight Store Backend.
This class defines the protocol that the backend classes should follow.
- __init__(*args, **kwargs)
- contains(weighting_key: str) bool[source]
Check if the database contains the weighting_key.
- Parameters:
weighting_key – The weighting key.
- Returns:
True or False if the key is in the database.
- delete(weighting_key: str) None[source]
Delete the weights from the database.
- Parameters:
weighting_key – The weighting key.
- property eep_indices: ndarray[Any, dtype[int32]]
Get the EEP indices.
- Returns:
The list of EEP indices.
- insert(weighting_key: str, weights: ndarray[Any, dtype[complex64]], indices: ndarray[Any, dtype[int32]] | None = None) None[source]
Insert the weights into the database.
- Parameters:
weighting_key – The weighting key.
weights – The list of weights.
indices – The EEP indices of the antennas
- select(weighting_key: str, indices_out: ndarray[Any, dtype[int32]] | None = None) ndarray[Any, dtype[complex64]][source]
Select the weights from the database.
- Parameters:
weighting_key – The weighting key.
indices_out – The EEP indices of the antennas
- Returns:
The list of weights.
- class MccsBeamWeightStoreBackendFactory[source]
A factory to create MccsBeamWeightStoreBackend objects.
- static create(backend: str, url: str, telescope: str, logger: Logger) MccsBeamWeightStoreBackend[source]
Make a beam weight store object with the chosen backend.
- Parameters:
backend – The beam weight store backend.
url – The beam weight store URL.
telescope – The name of the telescope.
logger – The logger object.
- Returns:
A BeamWeightStore object.
- Raises:
ValueError – If the backend is not known.