Subarray Device
This module implements MCCS functionality for monitoring and control of subarrays.
- class MccsSubarray(*args: Any, **kwargs: Any)[source]
MccsSubarray is the Tango device class for the MCCS Subarray prototype.
- AbortDevice() ska_tango_base.type_hints.TaskFunctionType[source]
Abort any long-running command such as
Configure()orScan().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(**kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]
Assign resources to this subarray with all relevant parameters.
- Parameters:
kwargs – mandatory arguments: - subarray_id: Description of observed sky frequency bands - subarray_beams: The beams to be assigned
- 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 this subarray with all relevant parameters.
- Parameters:
kwargs – arguments including: Mandatory subarray_beams including: - logical_bands: Description of observed sky frequency bands - update_rate: Update rate for pointing, default never - weighting_key_ref: Antenna weights, default uniform, - field: Pointing direction - calibration_id: Unique calibration id. Optional: - transaction_id: Unique transaction id.
- 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 resources for this subarray.
- Returns:
A tuple containing a return code and a string message indicating status.
- EndScan() ska_tango_base.type_hints.TaskFunctionType[source]
Stop the current scan associated with this subarray.
- 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 this subarray to IDLE.
- 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 this subarray.
- 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 this subarray to EMPTY.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Scan(scan_id: int, start_time: str | None = None, duration: float = 0.0, **kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]
Start the scan associated with this subarray.
- Parameters:
scan_id – The ID for this scan
start_time – the start time of the scan
duration – Scan duration in seconds. 0.0 or omitted means forever
kwargs – Any other kwargs
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SendTransientBuffer(argin: list[int]) ska_tango_base.type_hints.TaskFunctionType[source]
Cause the subarray to send the requested segment of the transient buffer to SDP.
The requested segment is specified by:
Start time (timestamp: milliseconds since UNIX epoch)
End time (timestamp: milliseconds since UNIX epoch)
Dispersion measure
Together, these parameters narrow the selection of transient buffer data to the period of time and frequencies that are of interest.
Additional metadata, such as the ID of a triggering Scheduling Block, may need to be supplied to allow SDP to assign data ownership correctly (TBD75).
- Todo:
This method is a stub that does nothing but return a dummy string.
- Parameters:
argin – Specification of the segment of the transient buffer to send
- Returns:
ASCII String that indicates status, for information purposes 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
- assignedResources() str[source]
Return this subarray’s assigned resources.
- Returns:
this subarray’s assigned resources.
- create_component_manager() SubarrayComponentManager[source]
Create and return a component manager for this device.
- Returns:
a component manager for this device.
- healthModelParams(argin: str) None[source]
Set the params for health transition rules.
- Parameters:
argin – JSON-string of dictionary of health states
- isConfigured() bool[source]
Return whether this subarray is configured.
- Returns:
whether this subarray is configured.
- is_ReleaseAllResources_allowed(request_type: LRCReqType | None = None) bool[source]
Return whether the
ReleaseAllResources()command may be called.Overriding base class behaviour (and ADR-8) due to behavioural changes in ska-tango-base 1.4.2.
- Parameters:
request_type – ENQUEUE_REQ when the LRC is enqueued by the Tango command and EXECUTE_REQ when the LRC is about to be executed by the executor.
- Returns:
whether the command may be called in the current device state
- 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
- qualityAssuranceMetrics() str[source]
Expose quality assurance metrics.
The returned structure is: >>> { >>> “subarray_beams”: { >>> “<subarray_beam_id>”: { >>> “apertures”: { >>> “<aperture_id>”: { >>> “is_beam_locked”: bool, >>> “<metric_name>”: value >>> }, >>> … >>> }, >>> “is_beam_locked”: bool >>> }, >>> … >>> }, >>> “beam_locked_percent”: float >>> }
Example: >>> { >>> “subarray_beams”: { >>> “1” : { >>> “apertures”: { >>> “AP001.01”: { >>> “is_beam_locked”: True, >>> } >>> “AP002.01”: { >>> “is_beam_locked”: False, >>> } >>> }, >>> “is_beam_locked”: False, >>> }, >>> “2” : { >>> “apertures”: { >>> “AP003.01”: { >>> “is_beam_locked”: False, >>> } >>> }, >>> “is_beam_locked”: False, >>> } >>> }, >>> “beam_locked_percent”: 0.0 >>> }
- Returns:
A json serialised dictionary
- resetCspIngestOnScan(reset: bool) None[source]
Set the resetCspIngestOnScan attribute.
- Parameters:
reset – Whether to reset CSP Ingest on stations when Scan is called.
- 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
- stationBeamTrls() list[str][source]
Return the TRLs of station beams assigned to this subarray.
- Returns:
TRLs of station beams assigned to this subarray