Station subpackage
This subpackage implements station functionality for MCCS.
- class MccsStation(*args: Any, **kwargs: Any)[source]
An implementation of a station Tango device for MCCS.
- AcquireDataForCalibration(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Instruct the SpsStation to start acquiring calibration data from the tiles.
- Parameters:
argin – json-ified dictionary containing the keys first_channel and last_channel
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- ApplyCalibration(switch_time: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Load the calibration coefficients at the specified time delay.
- Parameters:
switch_time – switch time, in ISO formatted time. If not set, defaults to calibrationLoadDelay seconds in the future.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> dp.command_inout("ApplyCalibration", "")
- ApplyConfiguration(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Apply the aggregated channel table to this Station’s SpsStation.
- Parameters:
argin – Configuration parameters encoded in a json string
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> dp.command_inout("ApplyConfiguration")
- ApplyPointingDelays(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Set the pointing delay parameters of this Station’s Tiles.
- Parameters:
argin – switch time, in ISO formatted time. Default: now
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> time_string = switch time as ISO formatted time >>> dp.command_inout("ApplyPointingDelays", time_string)
- BeamformerRunningForSubarray(argin: int) bool[source]
Get Beamformer Running status for a specific subarray.
- Parameters:
argin – subarray_id, in the range 1 to 16
- Returns:
True if the beamformer is running
- class BeamformerRunningForSubarrayCommand(*args: Any, **kwargs: Any)[source]
Class for handling the BeamformerRunningForSubarray command.
- __init__(component_manager: StationComponentManager, logger: Logger | None = None) None[source]
Initialise a new instance.
- Parameters:
component_manager – the device to which this command belongs.
logger – a logger for this command to use.
- do(*args: Any, **kwargs: Any) bool[source]
Implement
MccsStation.BeamformerRunningForSubarrayCommand().- Parameters:
args – the subarray id
kwargs – unspecified keyword arguments. This should be empty and is provided for type hinting only
- Returns:
True if beamformer is running
- Raises:
ValueError – if the subarray ID is missing or invalid
- ConfigureChannels(argin: list[int]) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Set the beamformer table entries for a station beam.
Entries are defined as a flattened 2D array, for a maximum of 48 entries Each entry is 7 channels long and corresponds to 8 consecutive frequency channels.
Note
A call to this method will delete any previous channels allocated to this beam before reconfiguration.
- Parameters:
argin –
list of channel block description.
Elements are:
channel block index: value in range 0:47 for the channel block to set
start_channel - (int) region starting channel, even in range 0 to 510
beam_index - (int) beam used for this region with range 0 to 47
subarray_id - (int) Subarray: 0 is reserved for unallocated entry
subarray_logical_channel - (int) logical channel # in the subarray
subarray_beam_id - (int) ID of the subarray beam
substation_id - (int) Substation
aperture_id: ID of the aperture (station*100+substation?)
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> dp.command_inout("ConfigureChannels", block_table)
- ConfigureSemiStatic(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Configure semi static information like position of antennas.
- Parameters:
argin – Semi static information
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> config = json.dumps({ "station": { "StationId": 1, "ref_latitude": 1.0, "ref_longitude": 1.0, "ref_height": 1.0, } }) >>> dp.command_inout("ConfigureSemiStatic", config)
- ConfigureStationForCalibration(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Configure the station for calibration.
- Parameters:
argin – JSON-ified argument containing DAQ configuration overrides.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/spsstation/ci-1") >>> dp.command_inout("ConfigureStationForCalibration")
- DeallocateSubarray(subarray_id: int) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Deallocates entries relative to a subarray in aggregate tables.
- Parameters:
subarray_id – the ID of the subarray to deallocate
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- EndScan(subarray_id: int) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Stop the current scan associated with the station_beam.
- Parameters:
subarray_id – the subarray for which the command applies
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- GetPointingDelays(argin: str) ndarray[source]
Get Pointing Coefficients.
- Parameters:
argin – stringified dict of args
- Returns:
The pointing delays as pairs of (delay, delay rate) in EEP order.
- class GetPointingDelaysCommand(*args: Any, **kwargs: Any)[source]
Class for handling the GetPointingDelays() command.
- __init__(component_manager: StationComponentManager, logger: Logger | None = None) None[source]
Initialise a new instance.
- Parameters:
component_manager – the device to which this command belongs.
logger – a logger for this command to use.
- do(*args: Any, **kwargs: Any) ndarray[source]
Implement
MccsStation.GetPointingDelaysCommand()command.- Parameters:
args – unspecified positional arguments. This should be empty and is provided for type hinting only
kwargs – unspecified keyword arguments. This should be empty and is provided for type hinting only
- Returns:
json encoded string containing list of dictionaries
- class InitCommand(*args: Any, **kwargs: Any)[source]
A class for
MccsStation’s Init command.The
do()method below is called uponMccsStation’s initialisation.- do(*args: Any, **kwargs: Any) tuple[ska_control_model.ResultCode, str][source]
Initialise the
MccsStation.- Parameters:
args – positional args to the component manager method
kwargs – keyword args to the component manager method
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Initialise() tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Initialise this station’s tiles.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- LoadBeamWeights(argin: str) None[source]
Get Pointing Coefficients.
- Parameters:
argin – stringified dict of args
- class LoadBeamWeightsCommand(*args: Any, **kwargs: Any)[source]
Class for handling the LoadBeamWeights() command.
- __init__(component_manager: StationComponentManager, logger: Logger | None = None) None[source]
Initialise a new instance.
- Parameters:
component_manager – the device to which this command belongs.
logger – a logger for this command to use.
- do(*args: Any, **kwargs: Any) None[source]
Implement
MccsStation.LoadBeamWeightsCommand()command.- Parameters:
args – unspecified positional arguments. This should be empty and is provided for type hinting only
kwargs – unspecified keyword arguments. This should be empty and is provided for type hinting only
- LoadCalibrationCoefficients(calibration_id: str | None) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Load Calibration solutions to the station, but does not apply them.
NOTE for each 384 channels this will select and load a solution specified by the selection rules https://developer.skao.int/projects/ska-low-mccs /en/0.22.0/api/calibration_store/selection_policy/index.html
TODO This method will load calibration solution for each antenna in the station. This will loop round all antenna and load a inverse jones for each 384 channels. A unity calibration is loaded is no solution is found, this sounds dangerous.
- Parameters:
calibration_id – Unique identifier for calibration.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> dp.command_inout("LoadCalibrationCoefficients")
- LoadPointingDelays(argin: ndarray) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Set the pointing delay parameters of this Station’s Tiles.
- Parameters:
argin – an array containing a beam index followed by antenna delays in antenna EEP order. 1 + 256*2 = 513 elements.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("low-mccs/station/ci-1") >>> dp.command_inout("LoadPointingDelays", delay_list)
- ResetCspIngest() tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Reset link for beam data packets to CSP to defaults.
- Returns:
result code name of ResetCspIngest
- Scan(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Start the scan associated with the station_beam.
- Parameters:
argin – Configuration parameters encoded in a json string
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SetCspIngest(argin: str) tuple[ska_control_model.ResultCode, str][source]
Configure link for beam data packets to CSP.
- Parameters:
argin –
json dictionary with optional keywords:
destination_ip - (string) Destination IP
source_port - (int) Source port for integrated data streams
destination_port - (int) Destination port for integrated data streams
- Returns:
result code name of SetCspIngest
- StartAcquisition(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Start data acquisition.
- Parameters:
argin – json dictionary with optional keywords:
start_time - (ISO UTC time) start time
delay - (int) delay start if StartTime is not specified, default 2s
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class StartAcquisitionCommand(*args: Any, **kwargs: Any)[source]
Class for handling the StartAcquisition() command.
This command takes as input a JSON string that conforms to the following schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://skao.int/Mccs_StartAcquisition.json", "title": "StartAcquisition schema", "description": "Schema for StartAcquisition command", "type": "object", "properties": { "start_time": { "description": "", "type": "string", "format": "time" }, "delay": { "description": "An acquisition start delay", "type": "integer" } } }
- __init__(command_tracker: ska_tango_base.base.CommandTracker, component_manager: StationComponentManager, callback: Callable | None = None, logger: Logger | None = None) None[source]
Initialise a new instance.
- Parameters:
command_tracker – the device’s command tracker
component_manager – the device’s component manager
callback – an optional callback to be called when this command starts and finishes.
logger – a logger for this command to log with.
- StopTracking(station_beam_id: int) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Stop tracking an object.
- Parameters:
station_beam_id – The ID of the station beam you wish to stop tracking.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- StopTrackingAll() tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Stop all tracking.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- TrackObject(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Track an object through the sky.
- Parameters:
argin – Configuration parameters encoded in a json string
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- TriggerAdcEqualisation(argin: str) tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Get the equalised ADC values.
Getting the equalised values takes up to 20 seconds (to get an average to avoid spikes). So we trigger the collection and publish to dbmPowers
- Parameters:
argin –
a JSON-ified dictionary containing:
- target_adc: the expected average power received by antennas in ADU units.
Has an input minimum of 0, but in code its limited to 4.2e-7 (corresponds to the maxiumum output of 31.75 dB). There is no maximum value, however, 40 ADUs will result in 0 dB with no bias and 1600 ADUs will result in 0 dB with the maxiumum bias allowed of 32dB.
- bias: user specifed bias in dB added to the antenna preadu levels.
Bias input value rounded as part of value sanitation and as a result it increases in steps of 0.25. Ranges from -32 to 32 with default 0.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- Example:
>>> dp = tango.DeviceProxy("mccs/station/001") >>> json_arg = json.dumps({"target_adc" : "18", bias: "1"}) >>> dp.command_inout("TriggerAdcEqualisation", json_arg)
- __init__(*args: Any, **kwargs: Any) None[source]
Initialise this device object.
- Parameters:
args – positional args to the init
kwargs – keyword args to the init
- activeBankCalibrationId() str[source]
Return the calibration id in the active bank.
- Returns:
Return the calibration id in use
- activeBeamInfo() str[source]
Return the configuration information of currently active PointingRequests.
- List information about each active beam. Info includes pointing type,
values, reference time, scan time, time step, next update time, and whether the scan is complete.
- Returns:
A json encoded dictionary with beam IDs as keys and their information as values.
- additionalDebug(argin: bool) None[source]
Set whether additional debug information is enabled.
- Parameters:
argin – True to enable additional debug information, False to disable.
- antennaMasks(masks: list[bool]) None[source]
Set the antennaMasks.
This must be executed in EngineeringMode. Value is persisted in the database.
- Parameters:
masks – masks to apply
- appliedWeightingBlock() ndarray[source]
Return the last applied weighting block.
Magic number -1 represents that this has not been updated.
- Returns:
The last know weightingBlock applied.
- beamTrls() list[str][source]
Return the TRLs of station beams associated with this station.
- Returns:
the TRLs of station beams associated with this station
- beamformerTable() list[list[int]][source]
Return the ids of the channels configured for this beam.
- Returns:
channel table
- calibrationCoefficients() list[float][source]
Return the calibration coefficients for the station.
- Todo:
How big should this array be? 4 complex values (Jones matrix) per channel. This station can have up to 16 tiles of up to 16 antennas, so that is 8 x 16 x 16 = 2048 coefficients per channel. But how many channels? 384 channels, 786432 elements per station (402M for SKA Low)
- Returns:
the calibration coefficients
- calibrationLoadDelay(value: float) None[source]
Set the load time for calls to ApplyCalibration.
- Parameters:
value – Number of seconds in the future for the calibration to be applied.
- configuredWeightingBlock() ndarray[source]
Return the configured weighting block.
This will return the Weighting Block configured. Note that this may or may not have been written to the hardware. Please view appliedWeightingBlock for the block applied.
Magic number -1 represents that this has not been updated.
- Returns:
The current configured weightingBlock.
- create_component_manager() StationComponentManager[source]
Create and return a component manager for this device.
- Returns:
a component manager for this device.
- cspIngestConfig() str[source]
Report the CspIngest configuration in use for this station.
- Returns:
json string with CspIngest configuration.
- dataDirectory() str[source]
Return the data directory.
(the parent directory for all files generated by this station)
- Returns:
the data directory
- dataReceivedResult() tuple[str, str] | None[source]
Read the result of the receiving of data.
- Returns:
A tuple containing the data mode of transmission and a json string with any additional data about the data such as the file name.
- delayCentre(value: list[float]) None[source]
Set the delay centre of the station.
- Parameters:
value – WGS84 position
- engineering_to_write(req_type: tango.AttReqType) bool[source]
Return a flag representing whether we are in Engineering mode.
- Parameters:
req_type – the request type
- Returns:
True if Tile is in Engineering Mode.
- failedPointingUpdates() str[source]
Return the tracking beams which are currently unlocked.
- Returns:
the tracking beams which are currently unlocked.
- healthModelParams(argin: str) None[source]
Set the params for health transition rules.
- Parameters:
argin – JSON-string of dictionary of health states
- healthThresholds(argin: str) None[source]
Set the params for health transition rules.
Default health thresholds:
- “antennas”: (f2f, d2f, d2d),
- tuple(int, int, int): Number of antennas failed before health failed,
Number of antennas degraded before health failed, Number of antennas degraded before health degraded
- Parameters:
argin – JSON-string of dictionary of health thresholds
- inactiveBankCalibrationId() str[source]
Return the calibration id of the inactive bank.
- Returns:
Return the inactive bank calibration id
- isCalibrated() bool[source]
Return a flag indicating whether this station is currently calibrated or not.
- Returns:
a flag indicating whether this station is currently calibrated or not.
- isConfigured() bool[source]
Return a flag indicating whether this station is currently configured or not.
- Returns:
a flag indicating whether this station is currently configured or not.
- isInitialised() bool[source]
Return true if all tiles in the SpsStation are initialised.
- Returns:
true if all tiles in the SpsStation are initialised.
- isSynchronised() bool[source]
Return true if all tiles in the SpsStation are synchronised.
- Returns:
true if all tiles in the SpsStation are synchronised.
- lastPointingDelays() str[source]
Return last pointing delays applied to the tiles.
Values are initialised to 0.0 if they haven’t been set. These values are in antenna EEP order.
- Returns:
last pointing delays applied to the tiles.
- numberOfChannels() int[source]
Return the total number of channels in the beamformer.
- Returns:
the total number of channels
- outsideTemperature() float | None[source]
Return the OutsideTemperature.
- Returns:
the OutsideTemperature.
- pointingUpdateTimingHistory(history_size: int) None[source]
Set the number of pointing update timing records to keep in history.
- Parameters:
history_size – Number of timing records to keep (must be > 0)
- refHeight() float[source]
Return the refHeight attribute.
- Returns:
the ellipsoidal height of the station reference position
- refLatitude() float[source]
Return the refLatitude attribute.
- Returns:
the WGS84 Latitude of the station reference position
- refLongitude() float[source]
Return the refLongitude attribute.
- Returns:
the WGS84 Longitude of the station reference position
- staticDelays() list[float][source]
Report the static delays in use for this station.
- Returns:
list of static delays.
- trackingStatus() str[source]
Return the tracking status of currently active PointingRequests.
Beam IDs not listed have no active PointingRequest.
- Returns:
Tracking status of active PointingRequests.
- class StationComponentManager(*args: Any, **kwargs: Any)[source]
A component manager for a station.
- __init__(station_id: int, ref_latitude: float, ref_longitude: float, ref_height: float, field_station_trl: str, antenna_trls: Sequence[str], antenna_station_locations: ndarray, antenna_element_ids: list[int], station_calibrator_trl: str, sps_station_trl: str, calibration_load_delay: float, antenna_masks: list[bool], use_beam_weights: bool, 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:
station_id – the id of this station
ref_latitude – reference latitude of the station.
ref_longitude – reference longitude of the station.
ref_height – reference ellipsoidal height of the station.
field_station_trl – TRL of the Tango device that manages this station’s FieldStation
antenna_trls – TRLs of the Tango devices and manage this station’s antennas
antenna_station_locations – array of the x, y, z positions of the antennas
antenna_element_ids – list of the element IDs of the antennas
station_calibrator_trl – TRL of the Tango devices and manage this station’s station calibrator
sps_station_trl – TRL of the Tango devices and manage this station’s Spshw station
calibration_load_delay – The amount of seconds in the future for the calibration solutions to be applied.
antenna_masks – the antenna masks to be masked from all beams in the beamformerTable.
use_beam_weights – True if we are prototyping the beam weighting feature.
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 – callback to be called when the component state changes
event_serialiser – the event serialiser to be used by this object.
- acquire_data_for_calibration(task_callback: Callable, *, first_channel: int, last_channel: int) tuple[ska_control_model.TaskStatus, str][source]
Submit the AcquireDataForCalibration slow task.
This method returns immediately after it is submitted for execution.
- Parameters:
first_channel – The first channel to acquire data for
last_channel – The last channel to acquire data for
task_callback – Update task state, defaults to None
- Returns:
Task status and response message
- property additional_debug: bool
Return whether additional debug information is enabled.
- Returns:
True if additional debug information is enabled, False otherwise.
- property antenna_masks: ndarray
Return the antennas masked from all beams.
- Returns:
the masked antenna.
- apply_calibration(load_time: str, task_callback: Callable | None = None, task_abort_event: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Apply the loaded solution to the station.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
load_time – An optional future time to swap the calibration banks.
task_abort_event – Abort the task
- Returns:
Task status and response message
- apply_configuration(task_callback: Callable | None = None, task_abort_event: Event | None = None, *, transaction_id: str | None = None, calibration_id: str | None = None, subarray_id: str | None = None) tuple[ska_control_model.TaskStatus, str][source]
Apply the beamformer and calibration configuration to SpsStation.
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
transaction_id – the transaction id for the configuration
calibration_id – Unique calibration id.
subarray_id – Subarray affected by command, default all.
task_callback – Update task state, defaults to None
- Returns:
a result code and response string
- apply_pointing_delays(load_time: str, task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the apply_pointing method.
This method returns immediately after it submitted self._apply_pointing for execution.
- Parameters:
load_time – time at which to load the pointing delay
task_callback – Update task state, defaults to None
- Returns:
a task status and response message
- beamformer_running_for_subarray(subarray_id: int) bool[source]
Check that the beamformer is running for a given subarray.
- Parameters:
subarray_id – subarray ID to check
- Returns:
True if the beamformer is running for the given subarray
- property beamformer_table: list[list[int]]
Return the channel table reformatted as would be needed by ConfigureChannels.
- Returns:
reformatted channel table
- cleanup() None[source]
Cleanup resources held by the component manager.
This includes cleaning up resources held by all sub-component managers.
- configure_channels(channel_blocks: list[int]) ska_control_model.ResultCode[source]
Configure channels for a station beam in the channel table.
- Parameters:
channel_blocks – List of defined channel table entries
- Returns:
a result code and response string
- configure_semi_static(task_callback: Callable | None = None, *, interface: str | None = None, station_config: dict, field_station_config: dict | None, antenna_config: dict | None) tuple[ska_control_model.TaskStatus, str][source]
Submit the configure method.
TODO Check if this is required anymore This method returns immediately after it submitted self._configure_semi_static for execution.
- Parameters:
interface – the schema version this is running against.
station_config – Configuration specification for the station device.
field_station_config – Configuration specification for the field station device.
antenna_config – Configuration specification for the antenna deviced.
task_callback – Update task state, defaults to None
- Returns:
a result code and response string
- configure_station_for_calibration(argin: str, task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the configure station for calibration method.
This method returns immediately after it submitted self._configure_station_for_calibration for execution.
- Parameters:
argin – JSON-ified argument containing DAQ configuration overrides.
task_callback – Update task state, defaults to None
- Returns:
a task staus and response message
- deallocate_subarray(subarray_id: int) ska_control_model.ResultCode[source]
Clear channels for a station beam in the channel table.
- Parameters:
subarray_id – subarray_id to clear
- Returns:
a result code and response string
- end_scan(subarray_id: int, 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:
subarray_id – The subarray for which the command applies
task_callback – Update task state, defaults to None
task_abort_event – Check for abort, defaults to None
- Returns:
Task status and response message
- get_pointing_delays(task_callback: Callable | None = None, *, interface: str | None = None, pointing_type: str, values: dict | str, time_step: float = 10.0, reference_time: str | None = None) ndarray[source]
Get the pointing delays for this station.
- Parameters:
interface – the schema version this is running against.
pointing_type – the type of pointing requested
values – the pointing values, either in alt_az or ra_dec
reference_time – time in which coordinates are equal, in ISO8601 formatted astropy.Time time
time_step – How long between each time step in seconds
task_callback – callback to signal end of command
- Returns:
list of pointing delays
- initialise(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the initialise method.
This method returns immediately after it submitted self._initialise for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
a task staus and response message
- property is_configured: bool
Return whether this station component manager is configured.
- Returns:
whether this station component manager is configured.
- load_beam_weights(subarray_beam_id: int, antenna_weights: list[float]) None[source]
Load beam weights to the weighting matrix.
:TODO Consider a station with fewer than 256 antenna. Or not Do we just mask the rest?
- Parameters:
subarray_beam_id – The beam we are loading the weights for (1-48)
antenna_weights – A list of the 256 antenna weights to apply.
- load_calibration_coefficients(calibration_id: str | None = None, task_callback: Callable | None = None, task_abort_event: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Load a calibration solution from the store to the stations TPM.
This method returns immediately after it is submitted for execution.
- Parameters:
calibration_id – Unique identifier for calibration.
task_callback – Update task state, defaults to None
task_abort_event – Abort the task
- Returns:
Task status and response message
- load_pointing_delays(delays: ndarray, task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Load the pointing delays for this station.
- Parameters:
delays – list of delays
task_callback – Update task state, defaults to None
- Returns:
a result code and list of pointing delays
- property number_of_channels: int
Return the total number of channels in the beamformer.
- Returns:
the total numebr of channels
- off(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the _off method.
This method returns immediately after it submitted self._off for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
a result code and response message
- on(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Submit the _on method.
This method returns immediately after it submitted self._on for execution.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
a task staus and response message
- property pointing_update_timing_history: str
Return the pointing update timing history as JSON.
- Returns:
JSON string containing timing history for recent pointing updates.
- property power_state: ska_control_model.PowerState | None
Return my power state.
- Returns:
my power state
- property power_state_lock: RLock
Return the power state lock of this component manager.
- Returns:
the power state lock of this component manager.
- property ref_latitude: float
Return whether this stations latitude.
- Returns:
this stations latitude.
- property ref_longitude: float
Return whether this stations longitude.
- Returns:
this stations longitude.
- reset_csp_ingest() tuple[list[ska_control_model.ResultCode], list[str | None]][source]
Reset link for beam data packets to CSP to defaults.
- Returns:
result code of ResetCspIngest
- scan(task_callback: Callable | None = None, *, interface: str | None = None, subarray_id: int, 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:
interface – the schema version this is running against.
subarray_id – The subarray for whic the command applies
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
- property scan_ids: list[int]
Return the current scan IDs for each subarray.
- Returns:
list of scan IDs starting from subarray 1, 0 = subarray not scanning
- set_csp_ingest(argin: str) tuple[ska_control_model.ResultCode, str][source]
Configure link for beam data packets to CSP.
- Parameters:
argin –
json dictionary with optional keywords:
destination_ip - (string) Destination IP
source_port - (int) Source port for integrated data streams
destination_port - (int) Destination port for integrated data streams
- Returns:
result code of SetCspIngest
- set_pointing_update_timing_history_size(history_size: int) None[source]
Set the number of pointing update timing records to keep.
- Parameters:
history_size – Number of timing records to keep (must be > 0)
- setup_pointing_helper() Pointing[source]
Set up the pointing helper.
- Returns:
A Pointing helper object.
- start_acquisition(task_callback: Callable | None = None, *, start_time: str | None = None, delay: int | None = 2) tuple[ska_control_model.TaskStatus, str][source]
Submit the start acquisition method.
This method returns immediately after it submitted self._start_acquisition for execution.
- Parameters:
start_time – the time at which to start data acquisition, defaults to None
delay – delay start, defaults to 2
task_callback – Update task state, defaults to None
- Returns:
a task staus and response message
- stop_tracking(station_beam_id: int, task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Stop a tracking thread.
- Parameters:
station_beam_id – the beam id whose tracking you wish to stop.
task_callback – Update task state, defaults to None
- Returns:
a result code and list of pointing delays
- stop_tracking_all(task_callback: Callable | None = None) tuple[ska_control_model.TaskStatus, str][source]
Stop all tracking threads.
- Parameters:
task_callback – Update task state, defaults to None
- Returns:
a result code and list of pointing delays
- property tileprogrammingstate: tuple[str]
Return the tileprogrammingstate of the SpsStation.
- Returns:
the tileprogrammingstate of the SpsStation.
- track_object(task_callback: Callable | None = None, task_abort_event: threading.Event | None = None, *, interface: str | None = None, pointing_type: str, values: dict, scan_time: float, reference_time: str | None = None, station_beam_number: int | None = 1, time_step: float | None = 10.0) tuple[ResultCode | TaskStatus, str][source]
Submit the track_object 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
interface – the schema version this is running against.
pointing_type – the type of pointing requested
values – Coordinates for object to be tracked
scan_time – Time to scan object in seconds
reference_time – time in which coordinates are equal, in ISO8601 formatted astropy.Time time
station_beam_number – The station beam number to be used
time_step – How long between each time step in seconds
- Returns:
A return code and a unique command ID.
- trigger_adc_equalisation(task_callback: Callable, *, target_adc: float, bias: float | None = 0.0) tuple[ska_control_model.TaskStatus, str][source]
Trigger Adc Equalisation on the sps station.
This method returns immediately after it is submitted for execution.
- Parameters:
task_callback – Update task state, defaults to None
target_adc – adc value in ADU units. Defaults to 17.
bias – user specifed bias in dB added to the antenna preadu levels. Defaults to 0.
- Returns:
Task status and response message
- class StationHealthModel(*args: Any, **kwargs: Any)[source]
A health model for a station.
- __init__(field_station_trl: str, sps_station_trl: str, antenna_trls: Sequence[str], health_changed_callback: ska_low_mccs_common.health.HealthChangedCallbackProtocol, thresholds: dict[str, float] | None = None) None[source]
Initialise a new instance.
- Parameters:
field_station_trl – the TRL of this station’s FieldStation
sps_station_trl – the TRL of this MccsStation’s SpsStation.
antenna_trls – the TRLs of this station’s antennas
health_changed_callback – callback to be called whenever there is a change to this this health model’s evaluated health state.
thresholds – the threshold parameters for the health rules
- antenna_health_changed(antenna_trl: str, antenna_health: ska_control_model.HealthState | None) None[source]
Handle a change in antenna health.
- Parameters:
antenna_trl – the TRL of the antenna whose health has changed
antenna_health – the health state of the specified antenna, or None if the antenna’s admin mode indicates that its health should not be rolled up.
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the station.
The overall health is based on the fault and communication status of the station overall, together with the health of the FieldStation, antennas and SpsStation that it manages.
This implementation simply sets the health of the station to the health of its least healthy component.
- Returns:
an overall health of the station
- field_station_health_changed(field_station_trl: str | None = None, field_station_health: ska_control_model.HealthState | None = None) None[source]
Handle a change in FieldStation health.
- Parameters:
field_station_health – the health state of the FieldStation, or None if the FieldStation’s admin mode indicates that its health should not be rolled up.
field_station_trl – the TRL of the FieldStation.
- sps_station_health_changed(sps_station_trl: str, sps_station_health: ska_control_model.HealthState | None) None[source]
Handle a change in SpsStation health.
- Parameters:
sps_station_trl – the TRL of the SpsStation
sps_station_health – the health state of the specified SpsStation, or None if the SpsStation’s admin mode indicates that its health should not be rolled up.
- class StationObsStateModel(logger: Logger, obs_state_changed_callback: Callable[[ska_control_model.ObsState], None])[source]
An observation state model for a station.
- __init__(logger: Logger, obs_state_changed_callback: Callable[[ska_control_model.ObsState], None]) None[source]
Initialise a new instance.
- Parameters:
logger – a logger for this model to use
obs_state_changed_callback – callback to be called when there is a change to this model’s evaluated observation state.
- Point station
AntennaInformationPointingPointing.__init__()Pointing.convert_to_astropy_angle()Pointing.delay_rates()Pointing.delays()Pointing.get_pointing_coefficients()Pointing.is_above_horizon()Pointing.point_array_equatorial()Pointing.point_array_static()Pointing.point_galactic()Pointing.point_tle()Pointing.point_to_special()Pointing.point_to_sun()
StationInformation
- Station component manager
StationComponentManagerStationComponentManager.__init__()StationComponentManager.acquire_data_for_calibration()StationComponentManager.additional_debugStationComponentManager.antenna_masksStationComponentManager.apply_calibration()StationComponentManager.apply_configuration()StationComponentManager.apply_pointing_delays()StationComponentManager.beamformer_running_for_subarray()StationComponentManager.beamformer_tableStationComponentManager.cleanup()StationComponentManager.configure_channels()StationComponentManager.configure_semi_static()StationComponentManager.configure_station_for_calibration()StationComponentManager.deallocate_subarray()StationComponentManager.end_scan()StationComponentManager.get_pointing_delays()StationComponentManager.initialise()StationComponentManager.is_configuredStationComponentManager.load_beam_weights()StationComponentManager.load_calibration_coefficients()StationComponentManager.load_pointing_delays()StationComponentManager.number_of_channelsStationComponentManager.off()StationComponentManager.on()StationComponentManager.pointing_update_timing_historyStationComponentManager.power_stateStationComponentManager.power_state_lockStationComponentManager.ref_heightStationComponentManager.ref_latitudeStationComponentManager.ref_longitudeStationComponentManager.reset_csp_ingest()StationComponentManager.scan()StationComponentManager.scan_idsStationComponentManager.set_csp_ingest()StationComponentManager.set_pointing_update_timing_history_size()StationComponentManager.setup_pointing_helper()StationComponentManager.start_acquisition()StationComponentManager.start_communicating()StationComponentManager.stop_communicating()StationComponentManager.stop_tracking()StationComponentManager.stop_tracking_all()StationComponentManager.tileprogrammingstateStationComponentManager.track_object()StationComponentManager.trigger_adc_equalisation()
- Station device
MccsStationMccsStation.AcquireDataForCalibration()MccsStation.ApplyCalibration()MccsStation.ApplyConfiguration()MccsStation.ApplyPointingDelays()MccsStation.BeamformerRunningForSubarray()MccsStation.BeamformerRunningForSubarrayCommandMccsStation.ConfigureChannels()MccsStation.ConfigureSemiStatic()MccsStation.ConfigureStationForCalibration()MccsStation.DeallocateSubarray()MccsStation.EndScan()MccsStation.GetPointingDelays()MccsStation.GetPointingDelaysCommandMccsStation.InitCommandMccsStation.Initialise()MccsStation.LoadBeamWeights()MccsStation.LoadBeamWeightsCommandMccsStation.LoadCalibrationCoefficients()MccsStation.LoadPointingDelays()MccsStation.ResetCspIngest()MccsStation.Scan()MccsStation.SetCspIngest()MccsStation.StartAcquisition()MccsStation.StartAcquisitionCommandMccsStation.StopTracking()MccsStation.StopTrackingAll()MccsStation.TrackObject()MccsStation.TriggerAdcEqualisation()MccsStation.__init__()MccsStation.activeBankCalibrationId()MccsStation.activeBeamInfo()MccsStation.additionalDebug()MccsStation.antennaMasks()MccsStation.appliedWeightingBlock()MccsStation.beamTrls()MccsStation.beamformerTable()MccsStation.calibrationCoefficients()MccsStation.calibrationJobId()MccsStation.calibrationLoadDelay()MccsStation.configuredWeightingBlock()MccsStation.create_component_manager()MccsStation.cspIngestConfig()MccsStation.daqJobId()MccsStation.daqPath()MccsStation.dataDirectory()MccsStation.dataReceivedResult()MccsStation.delayCentre()MccsStation.engineering_to_write()MccsStation.failedPointingUpdates()MccsStation.healthModelParams()MccsStation.healthReport()MccsStation.healthThresholds()MccsStation.inactiveBankCalibrationId()MccsStation.init_command_objects()MccsStation.init_device()MccsStation.isCalibrated()MccsStation.isConfigured()MccsStation.isInitialised()MccsStation.isSynchronised()MccsStation.lastPointingDelays()MccsStation.numberOfChannels()MccsStation.outsideTemperature()MccsStation.pointingUpdateTimingHistory()MccsStation.refHeight()MccsStation.refLatitude()MccsStation.refLongitude()MccsStation.staticDelays()MccsStation.stationID()MccsStation.trackingStatus()MccsStation.transientBufferTrl()MccsStation.useNewHealthModel()
main()
- Station health model
- Station health rules