Station Beam Component Manager

This module implements component management for station beams.

class StationBeamComponentManager(beam_id, logger, max_workers, communication_state_callback, component_state_callback)

A component manager for a station beam.

__init__(beam_id, logger, max_workers, communication_state_callback, component_state_callback)

Initialise a new instance.

Parameters:
  • beam_id (int) – the beam id of this station beam

  • 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]) – a callback to be called whenever the state of the station beam changes.

  • max_workers (int) – Maximum number of workers in the worker pool. 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.

property antenna_weights: list[float]

Return the antenna weights.

Returns:

the antenna weights

property aperture_id: str

Return the aperture id.

Returns:

the aperture id

apply_pointing(task_callback=None, task_abort_event=None)

Submit the apply_pointing 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

assign_resources(task_callback=None, *, interface=None, subarray_id, subarray_beam_id, aperture_id, station_id, station_trl, channel_blocks, hardware_beam, first_subarray_channel, 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 to which the beam belongs

  • subarray_beam_id (int) – ID of the subarray beam

  • aperture_id (str) – ID of the aperture, of the form “APx.y”

  • station_id (int) – ID of the associated station

  • station_trl (int) – TRL of the associated station

  • channel_blocks (list[int]) – List of the allocated station channel blocks

  • hardware_beam (int) – Allocated station hardware beam

  • first_subarray_channel (int) – First channel

  • number_of_channels (int) – Number of channels

Return type:

tuple[TaskStatus, str]

Returns:

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

property beam_id: int

Return the station beam id.

Returns:

the station beam id

property channels: list[list[int]]

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

Returns:

the ids of the channels configured for this subarray beam.

configure(task_callback=None, task_abort_event=None, *, interface=None, update_rate=1.0, logical_bands, weighting_key_ref='uniform', 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

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

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

  • update_rate (Optional[float]) – Update rate for pointing, default never

  • logical_bands (list[dict]) – Description of observed sky frequency bands

  • weighting_key_ref (Optional[str]) – Antenna weights, default uniform,

  • sky_coordinates (dict[str, Any]) – Pointing direction

Return type:

tuple[TaskStatus, str]

Returns:

A return code and a unique command ID.

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:

Task status and response message

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 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

obsreset(task_callback=None, task_abort_event=None)

Submit the obs_reset 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 phase_centre: list[float]

Return the phase centre.

Returns:

the phase centre

property pointing_delay: list[float]

Return the pointing delay.

Returns:

the pointing delay

property pointing_delay_rate: list[float]

Return the pointing delay rate.

Returns:

the pointing delay rate

property power_state: ska_control_model.PowerState | None

Return my power state.

Returns:

my power state

release_all_resources(task_callback=None)

Submit the release__all_resources 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:

Task status and response message

restart(task_callback=None, task_abort_event=None)

Submit the restart 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

scan(task_callback=None, *, scan_id, start_time=None, duration=864000.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 component.

Return type:

None

property station_id: int

Return the station id.

Returns:

the station ids

property station_trl: str

Return the station TRL.

If the station TRL is not set, return the empty string.

Returns:

the station TRL

stop_communicating()

Cease monitoring the component, and break off all communication with it.

Return type:

None

property subarray_id: int

Return the subarray id.

Returns:

the subarray id

property update_rate: float

Return the update rate.

Returns:

the update rate