Beam Weight Store Device

This module provides a Tango device for a Beam Weight Store.

class MccsBeamWeightStore(*args: Any, **kwargs: Any)[source]

The MCCS Beam Weight Store Tango device.

Contains(weighting_key: str) → bool[source]

Check in the data store contains the weighting_key.

Parameters:

weighting_key – The weighting key.

Returns:

True / False if the datastore contains the key.

Delete(weighting_key: str) → None[source]

Delete the weights from the data store.

Parameters:

weighting_key – The weighting key.

GetIndices() → list[int][source]

Get the EEP indices.

Returns:

the list of EEP indices

GetWeightingKeys() → list[str][source]

Get the weighting keys.

Returns:

the list of weighting keys

Insert(weighting_key: str, weights: list[float], indices: list[int] | None = None) → None[source]

Insert the weights into the data store.

The list of weights should be a complex array containing 256 elements. Since JSON cannot serialise complex numbers, this will be encoded as a float array containing 512 elements ordered as [r0, i0, r1, i1, … r255, i255].

Parameters:
  • weighting_key – The weighting key.

  • weights – The list of weights.

  • indices – The EEP indices of the antennas

Select(weighting_key: str, indices: list[int] | None = None) → ndarray[Any, dtype[float32]][source]

Select the weights from the data store.

Parameters:
  • weighting_key – The weighting key.

  • indices – The EEP indices

Returns:

The list of weights as a float array.

Update(weighting_key: str, weights: list[float], indices: list[int] | None = None) → None[source]

Update the weights into the data store.

The list of weights should be a complex array containing 256 elements. Since JSON cannot serialise complex numbers, this will be encoded as a float array containing 512 elements ordered as [r0, i0, r1, i1, … r255, i255].

Parameters:
  • weighting_key – The weighting key.

  • weights – The list of weights.

  • indices – The EEP indices of the antennas

change_control_level(control_level: ska_tango_base.base.ControlLevel) → None[source]

Change how the device interacts with the database.

Parameters:

control_level – The control level

Raises:

ValueError – If the control level is not recognised.

delete_device() → None[source]

Delete the device.

init_device() → None[source]

Initialise the device.

telescopeName() → str[source]

Get the telescope name.

Returns:

the telescope name.

url() → str[source]

Get the database url.

Returns:

the database url.