Subarray Health Model

An implementation of a health model for subarrays.

class SubarrayHealthModel(health_changed_callback, thresholds=None)

A health model for subarrays.

__init__(health_changed_callback, thresholds=None)

Initialise a new instance.

Parameters:
  • health_changed_callback (Callable) – a callback to be called when the health of the subarray (as evaluated by this model) changes

  • thresholds (Optional[dict[str, float]]) – Thresholds for failed and degraded states.

evaluate_health()

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.

Return type:

HealthState

Returns:

an overall health of the subarray

resources_changed(station_trls, subarray_beam_trls, station_beam_trls)

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 (set[str]) – the TRLs of stations assigned to this subarray

  • subarray_beam_trls (set[str]) – the TRLs of subarray beams assigned to this subarray

  • station_beam_trls (set[str]) – the TRLs of station beams assigned to this subarray

Return type:

None

station_beam_health_changed(trl, health_state)

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 (str) – the TRL of the station beam whose health has changed

  • health_state (HealthState | None) – the new health state of the station beam, or None if the station beam’s health should not be taken into account.

Return type:

None

station_health_changed(trl, health_state)

Handle change in station health.

This is a callback hook, called by the component manager when the health of a station changes.

Parameters:
  • trl (str) – the TRL of the station whose health has changed

  • health_state (HealthState | None) – the new health state of the station, or None if the subarray beam’s health should not be taken into account.

Return type:

None

subarray_beam_health_changed(trl, health_state)

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 (str) – the TRL of the subarray beam whose health has changed

  • health_state (HealthState | None) – the new health state of the subarray beam, or None if the subarray beam’s health should not be taken into account.

Return type:

None