Subarray Beam Device

@startuml
class SubarrayBeamHealthEvaluator
SubarrayBeamHealthEvaluator : +evaluate_health()
class SubarrayBeamDriver
SubarrayBeamDriver : +__init__()
SubarrayBeamDriver : +connection_status()
SubarrayBeamDriver : +is_locked()
class SubarrayBeamHardwareFactory
SubarrayBeamHardwareFactory : +__init__()
SubarrayBeamHardwareFactory : +hardware()
class SubarrayBeamHardwareManager
SubarrayBeamHardwareManager : +__init__()
SubarrayBeamHardwareManager : +is_locked()
class MccsSubarrayBeam
MccsSubarrayBeam : +__init__()
MccsSubarrayBeam : +do()
MccsSubarrayBeam : -_initialise_connections()
MccsSubarrayBeam : -_initialise_hardware_management()
MccsSubarrayBeam : -_initialise_health_monitoring()
MccsSubarrayBeam : +interrupt()
MccsSubarrayBeam : +init_command_objects()
MccsSubarrayBeam : +always_executed_hook()
MccsSubarrayBeam : +delete_device()
MccsSubarrayBeam : +health_changed()
MccsSubarrayBeam : +subarrayId()
MccsSubarrayBeam : +subarrayBeamId()
MccsSubarrayBeam : +stationIds()
MccsSubarrayBeam : +logicalBeamId()
MccsSubarrayBeam : +updateRate()
MccsSubarrayBeam : +isBeamLocked()
MccsSubarrayBeam : +channels()
MccsSubarrayBeam : +desiredPointing()
MccsSubarrayBeam : +Configure()
MccsSubarrayBeam : +Scan()
SubarrayBeamDriver : -_is_locked
SubarrayBeamHardwareFactory : -_hardware
MccsSubarrayBeam : -_thread
MccsSubarrayBeam : -_lock
MccsSubarrayBeam : -_interrupt
MccsSubarrayBeam : -_health_state
MccsSubarrayBeam : -_station_ids
MccsSubarrayBeam : -_logical_beam_id
MccsSubarrayBeam : -_desired_pointing

HardwareHealthEvaluator <|-- SubarrayBeamHealthEvaluator
HardwareDriver <|-- SubarrayBeamDriver
HardwareFactory <|-- SubarrayBeamHardwareFactory
HardwareManager <|-- SubarrayBeamHardwareManager
SKAObsDevice <|-- MccsSubarrayBeam
SubarrayBeamHardwareFactory -- SubarrayBeamDriver
SubarrayBeamHardwareManager -- SubarrayBeamHardwareFactory
SubarrayBeamHardwareManager -- SubarrayBeamHealthEvaluator
MccsSubarrayBeam -- SubarrayBeamHardwareManager
@enduml

This module implements the MCCS subarray beam device.

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

An implementation of a subarray beam Tango device for MCCS.

AbortDevice() ska_tango_base.type_hints.TaskFunctionType[source]

Abort any long-running command such as Configure() or Scan().

This will only cancel commands on this device, not further down the hierarchy, use Abort() for that use case.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

AssignResources(subarray_id: int, subarray_beam_id: int, first_subarray_channel: int, number_of_channels: int, apertures: dict) ska_tango_base.type_hints.TaskFunctionType[source]

Assign resources to the subarray_beam with all relevant parameters.

Parameters:
  • subarray_id – ID of the subarray to which the beam belongs

  • subarray_beam_id – Id of (this) beam

  • first_subarray_channel – First logical channel assigned to subarray

  • number_of_channels – Number of channels assigned to beam

  • apertures – list of dictionaries iwith each entry containing * station_id: (int) in range 1-512 * aperture_id: (str) with format APx.y; x must match station_ID * station_beam_trl: (str) * channel_blocks: Allocated channel blocks for this station * hardware_beam: Allocated hardware beam for this station

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Configure(**kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]

Configure the subarray_beam with all relevant parameters.

Parameters:

kwargs

Required entries:
subarray_id:

integer in range 1-16.

subarray_beam_id:

integer in range 1-48.

logical_bands:

list of band objects, each with: :start_channel: even integer in range 2-504. :number_of_channels: integer in range 8-384, multiple of 8.

Optional entries:

interface:

expected schema version URI.

update_rate:

update rate in Hz (minimum 0.0).

apertures:

list of aperture objects, each supporting aperture_id (required): APXXX.YY format, station_beam_trl, weighting_key_ref, calibration_id

sky_coordinates:

pointing definition with required reference_frame and optional timestamp, target_name, c1, c1_rate, c2, c2_rate, line1, line2.

field:

pointing definition with required reference_frame and optional timestamp, target_name, and attrs where attrs may include c1, c1_rate, c2, c2_rate, line1, line2.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

End() ska_tango_base.type_hints.TaskFunctionType[source]

Deconfigure the subarray_beam.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

EndScan() ska_tango_base.type_hints.TaskFunctionType[source]

Stop the current scan associated with the subarray_beam.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

ObsReset() ska_tango_base.type_hints.TaskFunctionType[source]

Reset to IDLE the subarray_beam.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

ReleaseAllResources() ska_tango_base.type_hints.TaskFunctionType[source]

Release all allocated resources from the subarray_beam.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Restart() ska_tango_base.type_hints.TaskFunctionType[source]

Restart to EMPTY the subarray_beam.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Scan(scan_id: int, **kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]

Start the scan associated with the subarray_beam.

Parameters:
  • scan_id – The ID for this scan

  • kwargs – Optional arguments including: - start_time: UTC time for begin of scan, None for immediate start - duration: Scan duration in seconds. 0.0 or omitted means forever

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

__init__(*args: Any, **kwargs: Any) None[source]

Initialise this device object.

Parameters:
  • args – positional args to the init

  • kwargs – keyword args to the init

antennaWeights() list[float][source]

Return the antenna weights configured for this beam.

Returns:

antenna weight

channels() list[list[int]][source]

Return the ids of the channels configured for this beam.

Returns:

channel ids

completed_Abort() None[source]

Abort command completed callback.

completed_AbortDevice() None[source]

Abort device command completed callback.

completed_AssignResources() None[source]

Assign Resources command completed callback.

completed_Configure() None[source]

Configure command completed callback.

completed_ObsReset() None[source]

Obs Reset command completed callback.

completed_ReleaseAllResources() None[source]

Release All Resources command completed callback.

completed_Restart() None[source]

Restart command completed callback.

create_component_manager() SubarrayBeamComponentManager[source]

Create and return a component manager for this device.

Returns:

a component manager for this device.

desiredPointing(values: list[float]) None[source]

Set the desired pointing of this beam.

  • activation time (s) – value range 0-10^37

  • azimuth position (deg) – value range 0-360

  • azimuth speed (deg/s) – value range 0-10^37

  • elevation position (deg) – value range 0-90

  • elevation rate (deg/s) – value range 0-10^37

Parameters:

values – the desired pointing of this beam, expressed as a sky coordinate set

firstSubarrayChannel() int[source]

Return the first logical channel allocated to the beam.

Returns:

the first logical channel allocated to the beam.

healthModelParams(argin: str) None[source]

Set the params for health transition rules.

Parameters:

argin – JSON-string of dictionary of health states

healthReport() str[source]

Get the health report.

Returns:

the health report.

init_device() None[source]

Initialise the device.

isBeamLocked(value: bool) None[source]

Set a flag indicating whether the beam is locked or not.

Parameters:

value – whether the beam is locked or not

logicalBeamId(logical_beam_id: int) None[source]

Set the logical beam id.

Parameters:

logical_beam_id – the logical beam id

missedEvents() int[source]

Get the amount of missed change events.

Some commands rely on change events from sub-devices, sometime we miss these events, this attribute keeps track of how many we know we have missed.

Returns:

the amount of missed change events

numberOfChannels() int[source]

Return the first logical channel allocated to the beam.

Returns:

the first logical channel allocated to the beam.

phaseCentre() list[float][source]

Return the phase centre.

Returns:

the phase centre

qualityAssuranceMetrics() str[source]

Expose quality assurance metrics.

Structure: >>> { >>> “apertures”: { >>> <aperture_id>: { >>> “is_beam_locked”: <bool> >>> }, >>> … >>> }, >>> “is_beam_locked”: <bool> >>> } :return: A json serialised dictionary

schedule_abort_task(task_callback: ska_tango_base.type_hints.TaskCallbackType) tuple[ska_control_model.TaskStatus, str][source]

Schedule an Abort task to begin executing immediately.

Subclasses should override this to change the behaviour of the Abort() command.

Parameters:

task_callback – Notified of progress of the abort command.

Returns:

A tuple containing TaskStatus.IN_PROGRESS and a message

started_Abort() None[source]

Abort command started callback.

started_AbortDevice() None[source]

Abort device command started callback.

started_AssignResources() None[source]

Assign Resources command started callback.

started_Configure() None[source]

Configure command started callback.

started_ObsReset() None[source]

Obs Reset command started callback.

started_ReleaseAllResources() None[source]

Release All Resources command started callback.

started_Restart() None[source]

Restart command started callback.

stationBeamIds(station_beam_ids: list[str]) None[source]

Set the station beam ids.

Parameters:

station_beam_ids – ids of the station beams for this subarray beam

stationIds(station_ids: list[int]) None[source]

Set the station ids.

Parameters:

station_ids – ids of the stations for this beam

subarrayBeamId() int[source]

Return the local subarray beam id (scoped per subarray, 1-48).

Returns:

the local subarray beam id

subarrayId() int[source]

Return the subarray id.

Returns:

the subarray id

targetName() str[source]

Get the Name of the current target.

Returns:

the name of the object being pointed at.

updateRate() float[source]

Return the update rate (in hertz) for this subarray beam.

Returns:

the update rate for this subarray beam

main(*args: str, **kwargs: str) int[source]

Entry point for module.

Parameters:
  • args – positional arguments

  • kwargs – named arguments

Returns:

exit code