Subarray Beam Component Manager

This module implements component management for subarray beams.

class SubarrayBeamComponentManager(logger, communication_state_callback, component_state_callback, _station_beams=None)

A component manager for a subarray beam.

__init__(logger, communication_state_callback, component_state_callback, _station_beams=None)

Initialise a new instance.

Parameters:
  • logger (Logger) – the logger to be used by this object.

  • communication_state_callback (Callable[[CommunicationStatus], None]) – callback to be called when the status of the communications channel between the component manager and its component changes

  • component_state_callback (Callable[..., None]) – callback to be called when the component state changes

  • _station_beams (Optional[dict[str, Any]]) – a optional injected station beams for testing purposes only. defaults to None

abort(task_callback=None)

Abort the observation.

Parameters:

task_callback (Optional[Callable]) – callback to be called when the status of the command changes

Return type:

tuple[TaskStatus, str]

Returns:

A task status and response message.

abort_device(task_callback=None)

Abort only this device, for use in RestartSubarray().

Parameters:

task_callback (Optional[Callable]) – callback to be called when the status of the command changes

Return type:

tuple[TaskStatus, str]

Returns:

A task status and response message.

property antenna_weights: list[float]

Return the antenna weights.

Returns:

the antenna weights

assign_resources(task_callback=None, *, interface=None, subarray_id, subarray_beam_id=0, apertures, first_subarray_channel=0, number_of_channels)

Submit the assign_resources slow task.

This method returns immediately after it is submitted for execution.

Parameters:
  • task_callback (Optional[Callable]) – Update task state, defaults to None

  • interface (Optional[str]) – the schema version this is running against.

  • subarray_id (int) – ID of the subarray which controls this beam

  • subarray_beam_id (Optional[int]) – Id of (this) beam

  • apertures (Iterable) – Allocated apertures

  • first_subarray_channel (Optional[int]) – First channel (default 0)

  • number_of_channels (int) – Number of allocated channels

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

property channels: list[list[int]]

Return the ids of the channels configured for this subarray beam.

Returns:

the ids of the channels configured for this subarray beam.

configure(task_callback=None, *, interface=None, subarray_id, subarray_beam_id, update_rate=0.0, logical_bands, apertures, sky_coordinates)

Submit the configure slow task.

This method returns immediately after it is submitted for execution.

Parameters:
  • task_callback (Optional[Callable]) – Update task state, defaults to None

  • interface (Optional[str]) – the schema version this is running against.

  • subarray_id (int) – ID of the subarray to which this

  • subarray_beam_id (int) – ID of (this) subarray beam

  • update_rate (Optional[float]) – Update rate for pointing in seconds

  • logical_bands (list[dict]) – list of spectral bands to observe

  • apertures (list[dict]) – list of aperture definition

  • sky_coordinates (dict[str, Any]) – Direction to point

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

property desired_pointing: list[float]

Return the desired pointing.

Returns:

the desired pointing

end(task_callback=None)

Submit the End slow task.

This method returns immediately after it is submitted for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

end_scan(task_callback=None, task_abort_event=None)

Submit the EndScan slow task.

This method returns immediately after it is submitted for execution.

Parameters:
  • task_callback (Optional[Callable]) – Update task state, defaults to None

  • task_abort_event (Optional[Event]) – Check for abort, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

Task status and response message

property first_channel: int

Return the first assigned subarray channel.

Returns:

the first assigned subarray channel.

property is_beam_locked: bool

Return whether the beam is locked.

Returns:

whether the beam is locked

property logical_beam_id: int

Return the logical beam id.

Returns:

the logical beam id

property number_of_channels: int

Return the number of allocated subarray channels.

Returns:

the number of channels

obsreset(task_callback=None)

Submit the ObsReset command.

This method returns immediately after it is submitted for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

property phase_centre: list[float]

Return the phase centre.

Returns:

the phase centre

release_all_resources(task_callback=None)

Submit the ReleaseAllResources slow task.

This method returns immediately after it is submitted for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

release_resources(task_callback=None)

Submit the ReleaseResources slow task.

This method returns immediately after it is submitted for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

restart(task_callback=None)

Submit the Restart command.

This method returns immediately after it is submitted for execution.

Parameters:

task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

A tuple containing a task status and a unique id string to identify the command

scan(task_callback=None, *, scan_id, start_time=None, duration=0.0)

Submit the Scan slow task.

This method returns immediately after it is submitted for execution.

Parameters:
  • scan_id (int) – The ID for this scan

  • start_time (Optional[str]) – UTC time for begin of scan, None for immediate start

  • duration (Optional[float]) – Scan duration in seconds. 0.0 or omitted means forever

  • task_callback (Optional[Callable]) – Update task state, defaults to None

Return type:

tuple[TaskStatus, str]

Returns:

Task status and response message

start_communicating()

Establish communication with the subarray beam.

Return type:

None

property station_beam_ids: list[str]

Return the station beam ids.

Returns:

list of beam IDs

property station_ids: list[int]

Return the station ids.

Returns:

the station ids

stop_communicating()

Break off communication with the subarray beam.

Return type:

None

property subarray_beam_id: int

Return the subarray beam id.

Returns:

the subarray beam id

property subarray_id: int

Return the subarray id.

Returns:

the subarray id

property update_rate: float

Return the update rate.

Returns:

the update rate