Station Beam Health Model
An implementation of a health model for station beams.
- class StationBeamHealthModel(*args: Any, **kwargs: Any)[source]
A health model for station beams.
- __init__(health_changed_callback: Callable, beam_locked_callback: Callable[[bool | None], None], ignore_power_state: bool = False, thresholds: dict[str, float] | None = None) None[source]
Initialise a new instance.
- Parameters:
health_changed_callback – a callback to be called when the health of the station beam (as evaluated by this model) changes
ignore_power_state – whether the health model should ignore the power state when computing health.
thresholds – Thresholds for failed degraded states.
beam_locked_callback – callback to call when the beam locked status changes. We say the beam is unlocked if we are over the FAILED limit of failed pointing updates in a row in the thresholds.
- antenna_health_changed(trl: str, health_state: ska_control_model.HealthState) None[source]
Handle change in station health.
This is a callback hook, called by the component manager when the health of a station changes. :param trl: the TRL of the antenna whose health has changed :param health_state: the new health state of the antenna.
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the station beam.
The overall health is based on the whether the beam is locked or not.
- Returns:
an overall health of the station beam
- failed_pointing_updates_changed(failed_pointing_updates: int | None) None[source]
Handle a change in how many pointing updates have failed in a row.
- Parameters:
failed_pointing_updates – how many pointing updates have failed in a row.
- resources_changed(antenna_trls: set[str]) None[source]
Change the resources used for the station beam.
- Parameters:
antenna_trls – TRLs of the antennas used for the beam
- station_fault_changed(station_fault: bool) None[source]
Handle a change in the fault state of the station beam’s station device.
This is a callback hook that is called when whether a station beam detects that the fault state of its station has changed. This could occur because the station’s health changes, or because the beam changes station.
- Parameters:
station_fault – the fault state of the station that is controlled by this beam.
- station_health_changed(station_health: ska_control_model.HealthState) None[source]
Handle a change in the health of the station device that this beam controls.
This is a callback hook that is called when whether a station beam detects that the health of its station has changed. This could occur because the station’s health changes, or because the beam changes station.
- Parameters:
station_health – the health of the station that is controlled by this beam