Subarray Beam Component Manager
This module implements component management for subarray beams.
- class SubarrayBeamComponentManager(*args: Any, **kwargs: Any)[source]
A component manager for a subarray beam.
- __init__(logger: Logger, obs_command_timeout: int, communication_state_callback: Callable[[ska_control_model.CommunicationStatus], None], component_state_callback: Callable[[...], None], _station_beams: dict[str, Any] | None = None) None[source]
Initialise a new instance.
- Parameters:
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
obs_command_timeout – the default timeout for obs commands in seconds.
component_state_callback – callback to be called when the component state changes
_station_beams – a optional injected station beams for testing purposes only. defaults to None
- 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.
- abort_device(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Abort only this device, for use in RestartSubarray().
- Parameters:
task_callback – callback to be called when the status of the command changes
- Returns:
A task status and response message.
- assign_resources(task_callback: Callable | None = None, *, interface: str | None = None, subarray_id: int, subarray_beam_id: int | None = 0, apertures: Iterable, first_subarray_channel: int | None = 0, number_of_channels: int) tuple[ska_control_model.TaskStatus, str][source]
Submit the assign_resources slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
interface – the schema version this is running against.
subarray_id – ID of the subarray which controls this beam
subarray_beam_id – Id of (this) beam
apertures – Allocated apertures
first_subarray_channel – First channel (default 0)
number_of_channels – Number of allocated channels
- 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: Callable | None = None, *, interface: str | None = None, subarray_id: int, subarray_beam_id: int, update_rate: float | None = 0.0, logical_bands: list[dict], apertures: list[dict], sky_coordinates: dict[str, Any]) tuple[ska_control_model.TaskStatus, str][source]
Submit the configure slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
interface – the schema version this is running against.
subarray_id – ID of the subarray to which this
subarray_beam_id – ID of (this) subarray beam
update_rate – Update rate for pointing in seconds
logical_bands – list of spectral bands to observe
apertures – list of aperture definition
sky_coordinates – Direction to point
- Returns:
A tuple containing a task status and a unique id string to identify the command
- end(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the End slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A tuple containing a task status and a unique id string to identify the command
- end_scan(task_callback: Callable | None = None, task_abort_event: Event | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the EndScan slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
task_abort_event – Check for abort, defaults to None
- 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 max_executing_tasks: int
Get the max number of tasks that can be executing at once.
- Returns:
max number of simultaneously executing tasks.
- property number_of_channels: int
Return the number of allocated subarray channels.
- Returns:
the number of channels
- obsreset(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the ObsReset command.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A tuple containing a task status and a unique id string to identify the command
- release_all_resources(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the ReleaseAllResources slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A tuple containing a task status and a unique id string to identify the command
- release_resources(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the ReleaseResources slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A tuple containing a task status and a unique id string to identify the command
- restart(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the Restart command.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
A tuple containing a task status and a unique id string to identify the command
- scan(task_callback: Callable | None = None, *, scan_id: int, start_time: str | None = None, duration: float | None = 0.0) tuple[ska_control_model.TaskStatus, str][source]
Submit the Scan slow task.
This method returns immediately after it is submitted for execution.
- 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
- Returns:
Task status and response message