Station beam subpackage
This subpackage implements station beam functionality for MCCS.
- class MccsStationBeam(*args, **kwargs)
An implementation of a station beam Tango device for MCCS.
- Abort()
Abort the current scan associated with the station_beam.
- class AbortCommand(command_tracker, component_manager, callback, logger=None)
A class for MccsSubarrayBeam’s Abort() command.
- __init__(command_tracker, component_manager, callback, logger=None)
Initialise a new AbortCommand instance.
- Parameters:
command_tracker (
CommandTracker
) – the device’s command trackercomponent_manager (
StationBeamComponentManager
) – the device’s component managercallback (
Callable
[[bool
],None
]) – callback to be called when this command states and finisheslogger (
Optional
[Logger
]) – a logger for this command object to yuse
- do(*args, **kwargs)
Stateless hook for Abort() command functionality.
- Parameters:
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- ApplyPointing()
Apply pointing delays to antennas associated with the station_beam.
- AssignResources(argin)
Assign resources to the station beam with all relevant parameters.
- Configure(argin)
Configure the station_beam with all relevant parameters.
- End()
Deconfigure the station_beam.
- EndScan()
Stop the current scan associated with the station_beam.
- class InitCommand(*args, **kwargs)
A class for
MccsStationBeam
’s Init command.- The
do()
method below is called upon
MccsStationBeam
’s initialisation.
- do()
Initialise the attributes and properties of the MccsStationBeam.
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- The
- ObsReset()
Reset to IDLE the station_beam.
- ReleaseAllResources()
Release all allocated resources from the station_beam.
- Restart()
Restart to EMPTY the station_beam.
- Scan(argin)
Start the scan associated with the station_beam.
- ToFault()
Put this station beam in ObsState.FAULT.
This is for use in testing only.
- __init__(*args, **kwargs)
Initialise this device object.
- antennaWeights()
Return the antenna weights configured for this beam.
- apertureId()
Return the Aperture Id.
- Return type:
- Returns:
the station beam Aperture Id, in the form APx.y y=substation
- channels()
Return the ids of the channels configured for this beam.
- create_component_manager()
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- desiredPointing()
Return the desired pointing of this beam.
- hardwareBeamId()
Return the timestamp used for the pointing coordinates.
- Return type:
- Returns:
the timestamp used for the pointing coordinates.
- healthModelParams(argin)
Set the params for health transition rules.
- init_command_objects()
Initialise the command handlers for commands supported by this device.
- Return type:
- isBeamLocked()
Return a flag indicating whether the beam is locked or not.
- Return type:
- Returns:
whether the beam is locked or not
- logicalBeamId()
Return the logical beam id.
- Todo:
this documentation needs to differentiate logical beam id from beam id
- Return type:
- Returns:
the logical beam id
- pointingDelay()
Return the pointing delay of this beam.
- pointingDelayRate()
Return the pointing delay rate of this beam.
- pointingReferenceFrame()
Return the Reference Frame ID for the pointing coordinates.
- Return type:
- Returns:
the Reference Frame ID for the pointing coordinates
- pointingTimestamp()
Return the timestamp used for the pointing coordinates.
- Return type:
- Returns:
the timestamp used for the pointing coordinates.
- scanId()
Return the scan ID for the current scan.
- Return type:
- Returns:
the scan ID or 0 if not scanning
- 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 beamlogger (
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 changescomponent_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.
- 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.
- 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 Noneinterface (
Optional
[str
]) – the schema version this is running against.subarray_id (
int
) – ID of the subarray to which the beam belongssubarray_beam_id (
int
) – ID of the subarray beamaperture_id (
str
) – ID of the aperture, of the form “APx.y”station_id (
int
) – ID of the associated stationstation_trl (
int
) – TRL of the associated stationchannel_blocks (
list
[int
]) – List of the allocated station channel blockshardware_beam (
int
) – Allocated station hardware beamfirst_subarray_channel (
int
) – First channelnumber_of_channels (
int
) – Number of channels
- Return type:
- 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 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 Nonetask_abort_event (
Optional
[Event
]) – Check for abort, defaults to Noneinterface (
Optional
[str
]) – the schema version this is running against.update_rate (
Optional
[float
]) – Update rate for pointing, default neverlogical_bands (
list
[dict
]) – Description of observed sky frequency bandsweighting_key_ref (
Optional
[str
]) – Antenna weights, default uniform,
- Return type:
- Returns:
A return code and a unique command ID.
- end(task_callback=None)
Submit the end slow task.
This method returns immediately after it is submitted for execution.
- end_scan(task_callback=None, task_abort_event=None)
Submit the EndScan slow task.
This method returns immediately after it is submitted for execution.
- property is_beam_locked: bool
Return whether the beam is locked.
- Returns:
whether the beam is locked
- obsreset(task_callback=None, task_abort_event=None)
Submit the obs_reset slow task.
This method returns immediately after it is submitted for execution.
- 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.
- restart(task_callback=None, task_abort_event=None)
Submit the restart slow task.
This method returns immediately after it is submitted for execution.
- 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:
- Return type:
- Returns:
Task status and response message
- 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:
- class StationBeamHealthModel(health_changed_callback, thresholds=None)
A health model for station beams.
- __init__(health_changed_callback, thresholds=None)
Initialise a new instance.
- antenna_health_changed(trl, health_state)
Handle change in station health.
This is a callback hook, called by the component manager when the health of a station changes. :type trl:
str
:param trl: the TRL of the antenna whose health has changed :type health_state:HealthState
:param health_state: the new health state of the antenna.- Return type:
- evaluate_health()
Compute overall health of the station beam.
The overall health is based on the whether the beam is locked or not.
- Return type:
- Returns:
an overall health of the station beam
- is_beam_locked_changed(is_beam_locked)
Handle a change in whether the station beam is locked.
This is a callback hook that is called when whether asubarray beam is locked changes.
- resources_changed(antenna_trls)
Change the resources used for the station beam.
- station_fault_changed(station_fault)
Handle a change in the fault state of the station beam’s station device.
This is a callback hook that is called when whether a station beam detects that the fault state of its station has changed. This could occur because the station’s health changes, or because the beam changes station.
- station_health_changed(station_health)
Handle a change in the health of the station device that this beam controls.
This is a callback hook that is called when whether a station beam detects that the health of its station has changed. This could occur because the station’s health changes, or because the beam changes station.
- Parameters:
station_health (
HealthState
) – the health of the station that is controlled by this beam- Return type:
- Station beam component manager
StationBeamComponentManager
StationBeamComponentManager.__init__()
StationBeamComponentManager.abort()
StationBeamComponentManager.antenna_weights
StationBeamComponentManager.aperture_id
StationBeamComponentManager.apply_pointing()
StationBeamComponentManager.assign_resources()
StationBeamComponentManager.beam_id
StationBeamComponentManager.channels
StationBeamComponentManager.configure()
StationBeamComponentManager.desired_pointing
StationBeamComponentManager.end()
StationBeamComponentManager.end_scan()
StationBeamComponentManager.is_beam_locked
StationBeamComponentManager.logical_beam_id
StationBeamComponentManager.obsreset()
StationBeamComponentManager.phase_centre
StationBeamComponentManager.pointing_delay
StationBeamComponentManager.pointing_delay_rate
StationBeamComponentManager.power_state
StationBeamComponentManager.release_all_resources()
StationBeamComponentManager.restart()
StationBeamComponentManager.scan()
StationBeamComponentManager.start_communicating()
StationBeamComponentManager.station_id
StationBeamComponentManager.station_trl
StationBeamComponentManager.stop_communicating()
StationBeamComponentManager.subarray_id
StationBeamComponentManager.update_rate
- Station beam device
MccsStationBeam
MccsStationBeam.Abort()
MccsStationBeam.AbortCommand
MccsStationBeam.ApplyPointing()
MccsStationBeam.AssignResources()
MccsStationBeam.Configure()
MccsStationBeam.End()
MccsStationBeam.EndScan()
MccsStationBeam.InitCommand
MccsStationBeam.ObsReset()
MccsStationBeam.ReleaseAllResources()
MccsStationBeam.Restart()
MccsStationBeam.Scan()
MccsStationBeam.ToFault()
MccsStationBeam.__init__()
MccsStationBeam.antennaWeights()
MccsStationBeam.apertureId()
MccsStationBeam.beamId()
MccsStationBeam.channels()
MccsStationBeam.create_component_manager()
MccsStationBeam.desiredPointing()
MccsStationBeam.hardwareBeamId()
MccsStationBeam.healthModelParams()
MccsStationBeam.init_command_objects()
MccsStationBeam.init_device()
MccsStationBeam.isBeamLocked()
MccsStationBeam.logicalBeamId()
MccsStationBeam.phaseCentre()
MccsStationBeam.pointingDelay()
MccsStationBeam.pointingDelayRate()
MccsStationBeam.pointingReferenceFrame()
MccsStationBeam.pointingTimestamp()
MccsStationBeam.scanId()
MccsStationBeam.stationId()
MccsStationBeam.stationTrl()
MccsStationBeam.subarrayId()
MccsStationBeam.updateRate()
main()
- Station beam health model
StationBeamHealthModel
StationBeamHealthModel.__init__()
StationBeamHealthModel.antenna_health_changed()
StationBeamHealthModel.evaluate_health()
StationBeamHealthModel.is_beam_locked_changed()
StationBeamHealthModel.resources_changed()
StationBeamHealthModel.station_fault_changed()
StationBeamHealthModel.station_health_changed()
- Station beam health rules