Subarray Beam Health Model
An implementation of a health model for subarray beams.
- class SubarrayBeamHealthModel(*args: Any, **kwargs: Any)[source]
A health model for subarray beams.
- __init__(station_beam_trls: Sequence[str], component_state_callback: Callable[[...], None], ignore_power_state: bool = False, thresholds: dict[str, float] | None = None) None[source]
Initialise a new instance.
- Parameters:
station_beam_trls – the TRLs of this subarray beam’s station beams
component_state_callback – callback to be called whenever there is a change to this component’s state, including the health model’s evaluated health state.
ignore_power_state – whether the health model should ignore the power state when computing health.
thresholds – the threshold parameters for the health rules
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the subarray beam.
The overall health is based on the whether the beam is locked or not.
- Returns:
an overall health of the subarray beam
- is_beam_locked_changed(is_beam_locked: bool) None[source]
Handle a change in whether the subarray beam is locked.
This is a callback hook called when the subarray beam lock changes.
- Parameters:
is_beam_locked – whether the subarray beam is locked
- remove_station_beam(station_beam_trl: str) None[source]
Remove a station beam from the station beams used to compute health.
- Parameters:
station_beam_trl – the TRL of the station beam to remove
- station_beam_health_changed(station_beam_trl: str, station_beam_health: ska_control_model.HealthState | None) None[source]
Handle a change in station beam health.
If the station beam TRL is not in the internal dictionary of station beam healths, it is added with the provided health
- Parameters:
station_beam_trl – the TRL of the station beam whose health has changed or whose health is to be added
station_beam_health – the health state of the specified station beam, or None if the station beam’s admin mode indicates that its health should not be rolled up.