Station Beam Component Manager

This module implements component management for station beams.

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

A component manager for a station beam.

__init__(beam_id: int, station_trl: str, beam_weight_store_trl: str, logger: Logger, communication_state_callback: Callable[[ska_control_model.CommunicationStatus], None], component_state_callback: Callable[[...], None], event_serialiser: ska_low_mccs_common.EventSerialiser | None = None) None[source]

Initialise a new instance.

Parameters:
  • beam_id – the beam id of this station beam

  • station_trl – the TRL of the station to which this beam belongs.

  • beam_weight_store_trl – the TRL of the beam weight store.

  • logger – the logger to be used by this object.

  • communication_state_callback – callback to be called when the status of the communications channel between the component manager and its component changes

  • component_state_callback – a callback to be called whenever the state of the station beam changes.

  • event_serialiser – the event serialiser to be used by this object.

abort(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]

Abort the observation.

Parameters:

task_callback – callback to be called when the status of the command changes

Returns:

A task status and response message.

property antenna_weights: list[complex]

Return the antenna weights.

Returns:

the antenna weights

property aperture_id: str

Return the aperture id.

Returns:

the aperture id

apply_pointing(task_callback: Callable | None = None, task_abort_event: Event | None = None) tuple[ska_control_model.ResultCode, str][source]

Apply the configured pointing to this station beam’s station.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

Returns:

Result and message. This is used in configure command to report errors.

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.

cleanup() None[source]

Cleanup resources held by the component manager.

This includes cleaning up resources held by all sub-component managers.

configure(logical_bands: list[dict[str, int]], interface: str | None = None, update_rate: float = 10.0, weighting_key_ref: str | None = 'uniform', field: dict[str, Any] | None = None, calibration_id: str | None = None, sky_coordinates: dict[str, Any] | None = None, task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Configure this station beam for scanning.

Parameters:
  • interface – the schema version this is running against.

  • update_rate – Update rate for pointing, default never

  • logical_bands – Description of observed sky frequency bands

  • weighting_key_ref – Antenna weights, default uniform,

  • sky_coordinates – Pointing direction

  • field – Pointing direction

  • calibration_id – Unique calibration id, if not given, the latest preferred calibration job will be used.

  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

property desired_pointing: list[float] | str

Return the desired pointing.

Returns:

the desired pointing

do_assign(subarray_id: int, subarray_beam_id: int, aperture_id: str, station_id: int, station_trl: str, channel_blocks: list[int], hardware_beam: int, first_subarray_channel: int, number_of_channels: int, interface: str | None = None, task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Assign resources to device.

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

  • subarray_beam_id – ID of the subarray beam

  • aperture_id – ID of the aperture in format “APx.y”

  • station_id – ID of the associated station

  • station_trl – TRL of the associated station

  • channel_blocks – List of the allocated station channel blocks

  • hardware_beam – Allocated station hardware beam

  • first_subarray_channel – First channel

  • number_of_channels – Number of channels

  • task_callback – Update task state, defaults to None

  • task_abort_event – Task abort, defaults to None

  • interface – interface to use. Currently not implemented.

end(task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Deconfigure the station_beam.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

end_scan(task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Execute the EndScan slow task.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

property logical_beam_id: int

Return the logical beam id.

Returns:

the logical beam id

property max_executing_tasks: int

Get the max number of tasks that can be executing at once.

Returns:

max number of simultaneously executing tasks.

obsreset(task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Reset (to IDLE) the station_beam.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

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: Callable | None = None, task_abort_event: Event | None = None) None[source]

Release all allocated resources from the station_beam.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

restart(task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Restart (to EMPTY) the station_beam.

Parameters:
  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

scan(scan_id: int, start_time: str | None = None, duration: float = 864000.0, task_callback: Callable | None = None, task_abort_event: Event | None = None) None[source]

Execute the Scan slow task.

Parameters:
  • scan_id – The ID for this scan

  • start_time – UTC time for begin of scan, None for immediate start

  • duration – Scan duration in seconds. 0.0 or omitted means forever

  • task_callback – Update task state, defaults to None

  • task_abort_event – Check for abort, defaults to None

start_communicating() None[source]

Establish communication with the component.

property station_id: int

Return the station id.

Returns:

the station ids

stop_communicating() None[source]

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

property subarray_id: int

Return the subarray id.

Returns:

the subarray id

property update_rate: float

Return the update rate.

Returns:

the update rate