Station Device
This module implements the MCCS station device.
- class MccsStation(*args: Any, **kwargs: Any)[source]
An implementation of a station Tango device for MCCS.
- AcquireDataForCalibration(first_channel: int, last_channel: int, daq_mode: str = 'TCC') ska_tango_base.type_hints.DevVarLongStringArrayType[source]
Instruct the SpsStation to start acquiring calibration data from the tiles.
- Parameters:
first_channel – The first channel to acquire data for
last_channel – The last channel to acquire data for
daq_mode – Which correlator to start, default TCC.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- ApplyCalibration(load_time: str) ska_tango_base.type_hints.TaskFunctionType[source]
Load the calibration coefficients at the specified time delay.
- Parameters:
load_time – load 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(**kwargs: Any) ska_tango_base.type_hints.DevVarLongStringArrayType[source]
Apply the aggregated channel table to this Station’s SpsStation.
- Parameters:
kwargs – containing optional transaction_id, calibration_id, subarray_id.
- 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(load_time: str) ska_tango_base.type_hints.TaskFunctionType[source]
Set the pointing delay parameters of this Station’s Tiles.
- Parameters:
load_time – 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(subarray_id: int) bool[source]
Get Beamformer Running status for a specific subarray.
- Parameters:
subarray_id – subarray_id, in the range 1 to 16
- Returns:
True if the beamformer is running
- ConfigureChannels(argin: list[int]) ska_tango_base.type_hints.DevVarLongStringArrayType[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(antenna_config: dict[str, Any], station_config: dict[str, Any] | None = None, field_station_config: dict[str, Any] | None = None) ska_tango_base.type_hints.TaskFunctionType[source]
Configure semi static information like position of antennas.
- Parameters:
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.
- Returns:
The task to be submitted as an LRC.
- 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) ska_tango_base.type_hints.TaskFunctionType[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.
- DeallocateSubarray(subarray_id: int) ska_tango_base.type_hints.DevVarLongStringArrayType[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) ska_tango_base.type_hints.DevVarLongStringArrayType[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(pointing_type: str, values: dict | str, **kwargs: Any) ndarray[source]
Get pointing coefficients.
- Parameters:
pointing_type – The type of pointing requested.
values – The pointing values, either in alt_az or ra_dec.
kwargs – Optional arguments, including:
interface: The schema version this is running against.
- reference_time: Time in which coordinates are equal,
in ISO8601 formatted astropy.Time.
time_step: Duration between each time step in seconds.
- Returns:
The pointing delays as pairs of (delay, delay rate) in EEP order.
- Initialise() ska_tango_base.type_hints.TaskFunctionType[source]
Initialise this station’s tiles.
- Returns:
The task to be submitted as an LRC.
- LoadBeamWeights(subarray_beam_id: int, antenna_weights: list[float]) None[source]
Load beam weights for a specific subarray beam.
- Parameters:
subarray_beam_id – The ID of the subarray beam for which to load weights.
antenna_weights – A list of weights for each antenna in the subarray beam.
- LoadCalibrationCoefficients(calibration_id: str | None) ska_tango_base.type_hints.TaskFunctionType[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(delays: ndarray) ska_tango_base.type_hints.TaskFunctionType[source]
Set the pointing delay parameters of this Station’s Tiles.
- Parameters:
delays – 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() ska_tango_base.type_hints.DevVarLongStringArrayType[source]
Reset link for beam data packets to CSP to defaults.
- Returns:
result code name of ResetCspIngest
- Scan(subarray_id: int, 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 the station_beam.
- Parameters:
subarray_id – The subarray for which 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
kwargs – kwargs
- Returns:
The task to be submitted as an LRC.
- 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(**kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]
Start data acquisition.
- Parameters:
kwargs – optional keywords:
start_time - (ISO UTC time) start time
delay - (int) delay start if StartTime is not specified, default 2s
- Returns:
The task to be submitted as a LRC.
- StopTracking(station_beam_id: int) ska_tango_base.type_hints.TaskFunctionType[source]
Stop the current tracking thread.
- Parameters:
station_beam_id – the beam id whose tracking you wish to stop.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- StopTrackingAll() ska_tango_base.type_hints.TaskFunctionType[source]
Stop all tracking threads.
- Returns:
The task to be submitted as a LRC.
- TrackObject(pointing_type: str, values: dict | str, reference_time: str, **kwargs: Any) ska_tango_base.type_hints.DevVarLongStringArrayType[source]
Track an object through the sky.
- Parameters:
pointing_type – the type of pointing requested
values – Coordinates for object to be tracked
reference_time – time in which coordinates are equal, in ISO8601 formatted astropy.Time time
kwargs – optional kwargs inclusing scan_time, station_beam_number, time_step
- Returns:
A tuple containing a return code and a string message. ResultCode.OK if tracking was successfully queued in the pointing manager, ResultCode.REJECTED otherwise.
- TriggerAdcEqualisation(target_adc: float, **kwargs: Any) ska_tango_base.type_hints.DevVarLongStringArrayType[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:
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.
kwargs – optional parameters include 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.
- execute_AcquireDataForCalibration(first_channel: int, last_channel: int, daq_mode: str) ska_tango_base.type_hints.TaskFunctionType[source]
Execute the AcquireDataForCalibration command as a long-running task.
- Parameters:
first_channel – The first channel to acquire data for
last_channel – The last channel to acquire data for
daq_mode – Which correlator to start, default TCC.
- Returns:
The task to be submitted as a LRC.
- execute_ApplyConfiguration(**kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]
Apply the aggregated channel table to this Station’s SpsStation.
- Parameters:
kwargs – containing optional transaction_id, calibration_id, subarray_id.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- execute_EndScan(subarray_id: int) ska_tango_base.type_hints.TaskFunctionType[source]
Execute the EndScan command as a long-running task.
- 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.
- execute_Off() ska_tango_base.type_hints.TaskFunctionType[source]
Turn the station on.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- execute_On() ska_tango_base.type_hints.TaskFunctionType[source]
Turn the station on.
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- execute_TriggerAdcEqualisation(target_adc: float, **kwargs: Any) ska_tango_base.type_hints.TaskFunctionType[source]
Execute the TriggerAdcEqualisation command as a long-running task.
- Parameters:
target_adc – target value for ADC gain.
kwargs – optional parameters include bias.
- Returns:
The task to be submitted as a LRC.
- 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.
- latestPreferredJobId() str[source]
Return the user_friendly_name of the most recent preferred calibration job.
- Returns:
the user_friendly_name of the most recent preferred job, or an empty string if none exists.
- 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.