Subarray Node

class tmcprototype.subarraynode.src.subarraynode.subarray_node.SubarrayNode(*args, **kwargs)

Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.

Device Properties

SdpSubarrayLNFQDN:
 This property contains the FQDN of the SDP Subarray Leaf Node associated with the Subarray Node.
CspSubarrayLNFQDN:
 This property contains the FQDN of the CSP Subarray Leaf Node associated with the Subarray Node.
DishLeafNodePrefix:
 Device name prefix for the Dish Leaf Node.
CspSubarrayFQDN:
 FQDN of the CSP Subarray Tango Device Server.
SdpSubarrayFQDN:
 FQDN of the CSP Subarray Tango Device Server.

Device Attributes

ScanID:ID of ongoing SCAN
SbID:ID of ongoing Scheduling Block
ActivityMessage:
 String providing information about the current activity in SubarrayNode.
ReceptorIDList:ID List of the Receptors assigned in the Subarray.
class tmcprototype.subarraynode.src.subarraynode.on_command.On(*args, **kwargs)

A class for the SubarrayNode’s On() command.

This command invokes On Command on CSPSubarray and SDPSubarray through respective leaf nodes. This comamnd changes Subaray device state from OFF to ON.

do()

Method to invoke On command.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful
class tmcprototype.subarraynode.src.subarraynode.off_command.Off(*args, **kwargs)

A class for the SubarrayNodes’s Off() command.

This command invokes Off Command on CSPSubarray and SDPSubarray through respective leaf nodes. This comamnd changes Subaray device state from ON to OFF.

do()

Method to invoke Off command.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful
class tmcprototype.subarraynode.src.subarraynode.assign_resources_command.AssignResources(*args, **kwargs)

A class for SubarrayNode’s AssignResources() command.

Assigns resources to the subarray. It accepts receptor id list as well as SDP resources string as a DevString. Upon successful execution, the ‘receptorIDList’ attribute of the subarray is updated with the list of receptors and SDP resources string is pass to SDPSubarrayLeafNode, and returns list of assigned resources as well as passed SDP string as a DevString.

Note: Resource allocation for CSP and SDP resources is also implemented but currently CSP accepts only receptorIDList and SDP accepts resources allocated to it.

do(argin)

Method to invoke AssignResources command.

Parameters:argin – DevString.

Example:

{“subarraID”:1,”dish”:{“receptorIDList”:[“0002”,”0001”]},”sdp”:{“id”: “sbi-mvp01-20200325-00001”,”max_length”:100.0,”scan_types”:[{“id”:”science_A”, “coordinate_system”:”ICRS”,”ra”:”02:42:40.771”,”dec”:”-00:00:47.84”,”channels”: [{“count”:744,”start”:0,”stride”:2,”freq_min”:0.35e9,”freq_max”:0.368e9, “link_map”:[[0,0],[200,1],[744,2],[944,3]]},{“count”:744,”start”:2000,”stride”:1, “freq_min”:0.36e9,”freq_max”:0.368e9,”link_map”:[[2000,4],[2200,5]]}]},{“id”: “calibration_B”,”coordinate_system”:”ICRS”,”ra”:”12:29:06.699”,”dec”:”02:03:08.598”, “channels”:[{“count”:744,”start”:0,”stride”:2,”freq_min”:0.35e9, “freq_max”:0.368e9,”link_map”:[[0,0],[200,1],[744,2],[944,3]]},{“count”:744, “start”:2000,”stride”:1,”freq_min”:0.36e9,”freq_max”:0.368e9,”link_map”:[[2000,4], [2200,5]]}]}],”processing_blocks”:[{“id”:”pb-mvp01-20200325-00001”,”workflow”: {“type”:”realtime”,”id”:”vis_receive”,”version”:”0.1.0”},”parameters”:{}}, {“id”:”pb-mvp01-20200325-00002”,”workflow”:{“type”:”realtime”,”id”:”test_realtime”, “version”:”0.1.0”},”parameters”:{}},{“id”:”pb-mvp01-20200325-00003”,”workflow”: {“type”:”batch”,”id”:”ical”,”version”:”0.1.0”},”parameters”:{},”dependencies”:[ {“pb_id”:”pb-mvp01-20200325-00001”,”type”:[“visibilities”]}]},{“id”: “pb-mvp01-20200325-00004”,”workflow”:{“type”:”batch”,”id”:”dpreb”,”version”:”0.1.0”}, “parameters”:{},”dependencies”:[{“pb_id”:”pb-mvp01-20200325-00003”,”type”: [“calibration”]}]}]}}

Returns:

A tuple containing a return code and string of Resources added to the Subarray. Example of string of Resources :

[“0001”,”0002”]

as argout if allocation successful.

Return type:

(ResultCode, str)

Raises:

ValueError if input argument json string contains invalid value

DevFailed if the command execution is not successful

class tmcprototype.subarraynode.src.subarraynode.release_all_resources_command.ReleaseAllResources(*args, **kwargs)

A class for SKASubarray’s ReleaseAllResources() command.

It checks whether all resources are already released. If yes then it throws error while executing command. If not it Releases all the resources from the subarray i.e. Releases resources from TMC Subarray Node, CSP Subarray and SDP Subarray. If the command execution fails, array of receptors(device names) which are failed to be released from the subarray, is returned to Central Node. Upon successful execution, all the resources of a given subarray get released and empty array is returned. Selective release is not yet supported.

do()

Method to invoke ReleaseAllResources command.

Returns:A tuple containing a return code and “[]” as a string on successful release all resources.

Example: “[]” as string on successful release all resources.

Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful
class tmcprototype.subarraynode.src.subarraynode.configure_command.Configure(*args, **kwargs)

A class for SubarrayNode’s Configure() command.

Configures the resources assigned to the Subarray.The configuration data for SDP, CSP and Dish is extracted out of the input configuration string and relayed to the respective underlying devices (SDP Subarray Leaf Node, CSP Subarray Leaf Node and Dish Leaf Node).

do(argin)

Method to invoke Configure command.

Parameters:argin – DevString.

JSON string that includes pointing parameters of Dish - Azimuth and Elevation Angle, CSP Configuration and SDP Configuration parameters. JSON string example is: {“pointing”:{“target”:{“system”:”ICRS”,”name”:”Polaris Australis”,”RA”:”21:08:47.92”,”dec”:”-88:57:22.9”}} ,”dish”:{“receiverBand”:”1”},”csp”:{“interface”:”https://schema.skatelescope.org/ska-csp-configure/1.0” ,”subarray”:{“subarrayName”:”science period 23”},”common”:{“id”:”sbi-mvp01-20200325-00001-science_A”, “frequencyBand”:”1”,”subarrayID”:1},”cbf”:{“fsp”:[{“fspID”:1,”functionMode”:”CORR”,”frequencySliceID”:1, “integrationTime”:1400,”corrBandwidth”:0,”channelAveragingMap”:[[0,2],[744,0]],”ChannelOffset”:0,”outputLinkMap” :[[0,0],[200,1]],”outputHost”:[[0,”192.168.1.1”]],”outputPort”:[[0,9000,1]]},{“fspID”:2,”functionMode”: “CORR”,”frequencySliceID”:2,”integrationTime”:1400,”corrBandwidth”:0,”channelAveragingMap”:[[0,2],[744,0]], “fspChannelOffset”:744,”outputLinkMap”:[[0,4],[200,5]],”outputHost”:[[0,”192.168.1.1”]],”outputPort”: [[0,9744,1]]}],”vlbi”:{}},”pss”:{},”pst”:{}},”sdp”:{“scan_type”:”science_A”},”tmc”:{“scanDuration”:10.0}}

Note: While invoking this command from JIVE, provide above JSON string without any space.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ReturnCode, str)
Raises:JSONDecodeError if input argument json string contains invalid value
class tmcprototype.subarraynode.src.subarraynode.scan_command.Scan(*args, **kwargs)

A class for SubarrayNode’s Scan() command.

This command accepts id as input. And it Schedule scan on subarray from where scan command is invoked on respective CSP and SDP subarray node for the provided interval of time. It checks whether the scan is already in progress. If yes it throws error showing duplication of command.

do(argin)

Method to invoke Scan command.

Parameters:argin – DevString. JSON string containing id.
Example:{“id”: 1}

Note: Above JSON string can be used as an input argument while invoking this command from JIVE.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ReturnCode, str)
Raises:DevFailed if the command execution is not successful
class tmcprototype.subarraynode.src.subarraynode.end_scan_command.EndScan(*args, **kwargs)

A class for SubarrayNode’s EndScan() command.

Ends the scan. It is invoked on subarray after completion of the scan duration. It can also be invoked by an external client while a scan is in progress, Which stops the scan immediately irrespective of the provided scan duration.

do()

Method to invoke Endscan command.

Returns:A tuple containing a return code and a string message indicating status.

The message is for information purpose only.

Return type:(ReturnCode, str)
Raises:DevFailed if the command execution is not successful.
class tmcprototype.subarraynode.src.subarraynode.end_command.End(*args, **kwargs)

A class for SubarrayNode’s End() command.

This command on Subarray Node invokes EndSB command on CSP Subarray Leaf Node and SDP Subarray Leaf Node, and stops tracking of all the assigned dishes.

do()

Method to invoke End command.

Returns:A tuple containing a return code and a string message indicating status.

The message is for information purpose only.

Return type:(ResultCode, str)
Raises:DevFailed if the command execution is not successful.
class tmcprototype.subarraynode.src.subarraynode.abort_command.Abort(*args, **kwargs)

A class for SubarrayNode’s Abort() command.

This command on Subarray Node invokes Abort command on CSP Subarray Leaf Node and SDP Subarray Leaf Node, and stops tracking of all the assigned dishes.

do()

Method to invoke Abort command.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if error occurs in invoking command on any of the devices like CSPSubarrayLeafNode, SDPSubarrayLeafNode or DishLeafNode
class tmcprototype.subarraynode.src.subarraynode.restart_command.Restart(*args, **kwargs)

A class for SubarrayNode’s Restart() command.

This command invokes Restart command on CSPSubarrayLeafNode, SDpSubarrayLeafNode and DishLeafNode.

do()

Method to invoke Restart command.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if error occurs while invoking command on CSPSubarrayLeafNode, SDpSubarrayLeafNode or DishLeafNode.
class tmcprototype.subarraynode.src.subarraynode.obsreset_command.ObsReset(*args, **kwargs)

A class for SubarrayNode’s ObsReset() command.

This command invokes ObsReset command on CspSubarrayLeafNode, SdpSubarrayLeafNode and DishLeafNode.

do()

Method to invoke ObsReset command.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)
Raises:DevFailed if error occurs while invoking command on CspSubarrayLeafNode, SdpSubarrayLeafNode or DishLeafNode.
class tmcprototype.subarraynode.src.subarraynode.track_command.Track(*args, **kwargs)

A class for SubarrayNode’s Track command.

Invokes Track command on the Dishes assigned to the Subarray.

do(argin)

Method to invoke Track command.

Parameters:argin – DevString

Example: radec|21:08:47.92|-88:57:22.9 as argin Argin to be provided is the Ra and Dec values where first value is tag that is radec, second value is Ra in Hr:Min:Sec, and third value is Dec in Deg:Min:Sec.

Returns:A tuple containing a return code and a string message indicating status. The message is for information purpose only.
Return type:(ResultCode, str)