Subarray Health Model
An implementation of a health model for subarrays.
- class SubarrayHealthModel(*args: Any, **kwargs: Any)[source]
A health model for subarrays.
- __init__(health_changed_callback: Callable, 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 subarray (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 and degraded states.
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the subarray.
The overall health is based on the fault and communication status of the subarray overall, together with the health of its stations and subarray beams.
This implementation simply sets the health of the station to the health of its least healthy component.
- Returns:
an overall health of the subarray
- resources_changed(station_trls: set[str], subarray_beam_trls: set[str], station_beam_trls: set[str]) None[source]
Handle change in subarray resources.
This is a callback hook, called by the component manager when the resources of the subarray changes.
- Parameters:
station_trls – the TRLs of stations assigned to this subarray
subarray_beam_trls – the TRLs of subarray beams assigned to this subarray
station_beam_trls – the TRLs of station beams assigned to this subarray
- station_beam_health_changed(trl: str, health_state: HealthState | None) None[source]
Handle change in station beam health.
This is a callback hook, called by the component manager when the health of a station beam changes.
- Parameters:
trl – the TRL of the station beam whose health has changed
health_state – the new health state of the station beam, or None if the station beam’s health should not be taken into account.
- station_health_changed(trl: str, health_state: HealthState | None) None[source]
Handle change in station health.
This is a callback hook, called by the component manager when the health of a station changes.
- Parameters:
trl – the TRL of the station whose health has changed
health_state – the new health state of the station, or None if the subarray beam’s health should not be taken into account.
- subarray_beam_health_changed(trl: str, health_state: HealthState | None) None[source]
Handle change in subarray beam health.
This is a callback hook, called by the component manager when the health of a subarray beam changes.
- Parameters:
trl – the TRL of the subarray beam whose health has changed
health_state – the new health state of the subarray beam, or None if the subarray beam’s health should not be taken into account.