Subarray Health Rules

The rules model for subarray health.

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

A class to handle transition rules for station.

property default_thresholds: dict[str, float]

Get the default thresholds for this device.

Returns:

the default thresholds

degraded_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether DEGRADED is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • beam_healths – The healths of the subarray beams.

Returns:

If the subarray is degraded or not.

failed_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether FAILED is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • beam_healths – The healths of the subarray beams.

Returns:

If the subarray is failed or not.

healthy_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether OK is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • beam_healths – The healths of the subarray beams.

Returns:

If the subarray is healthy or not.

unknown_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether UNKNOWN is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • beam_healths – The healths of the subarray beams.

Returns:

If the subarray is in unknown state.