CSP Subarray Leaf Node

CSP Subarray Leaf node is monitors the CSP Subarray and issues control actions during an observation. It also acts as a CSP contact point for Subarray Node for observation execution for TMC.

class tmcprototype.cspsubarrayleafnode.src.cspsubarrayleafnode.csp_subarray_leaf_node.CspSubarrayLeafNode(*args, **kwargs)

CSP Subarray Leaf node monitors the CSP Subarray and issues control actions during an observation.

Abort()

Invokes Abort command on CspSubarrayLeafNode

class AbortCommand(*args, **kwargs)

A class for CSPSubarrayLeafNode’s Abort() command.

abort_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

check_allowed()

Checks whether this command is allowed to be run in current device state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do()

This command invokes Abort command on CSP Subarray.

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 CSPSubarray.
AssignResources(argin)

Invokes AssignResources command on CspSubarrayLeafNode.

class AssignResourcesCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s AssignResources() command.

add_receptors_ended(event)

Callback function immediately executed when the asynchronous invoked command returns.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

Raises:

DevFailed if this command is not allowed to be run

in current device state

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do(argin)

It accepts receptor id list in JSON string format and invokes AddReceptors command on CspSubarray with receptorIDList (list of integers) as an input argument.

:param argin:DevString. The string in JSON format. The JSON contains following values:

dish:

Mandatory JSON object consisting of

receptorIDList:
DevVarString The individual string should contain dish numbers in string format with preceding zeroes upto 3 digits. E.g. 0001, 0002.

Example: {

“dish”: {
“receptorIDList”: [
“0001”, “0002”

]

}

}

Note: Enter the json string without spaces as an input.

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:ValueError if input argument json string contains invalid value KeyError if input argument json string contains invalid key DevFailed if the command execution is not successful
Configure(argin)

Invokes Configure command on CspSubarrayLeafNode

class ConfigureCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s Configure() command.

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
configure_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

do(argin)

This command configures a scan. It accepts configuration information in JSON string format and invokes Configure command on CspSubarray.

:param argin:DevString. The string in JSON format. The JSON contains following values:

Example: {“id”:”sbi-mvp01-20200325-00001-science_A”,”frequencyBand”:”1”,”fsp”:[{“fspID”:1,”functionMode”: “CORR”, “frequencySliceID”:1,”integrationTime”:1400,”corrBandwidth”:0,”channelAveragingMap”: [[0,2],[744,0]], “fspChannelOffset”: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]]}],”delayModelSubscriptionPoint”:

“ska_mid/tm_leaf_node/csp_subarray01/delayModel”,”pointing”:{“target”:{“system”:”ICRS”, “name”:”Polaris Australis”,”RA”:”21:08:47.92”,”dec”:”-88:57:22.9”}}}

Note: Enter the json string without spaces as a input.

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 ValueError if input argument json string contains invalid value
CspSubarrayFQDN

Used by autodoc_mock_imports.

EndScan()

Invokes EndScan command on CspSubarrayLeafNode

class EndScanCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s EndScan() command.

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in

current device state

Return type:boolean
Raises:DevFailed if this command is not allowed to be run

in current device state

do()

It invokes EndScan command on CspSubarray. This command is allowed when CspSubarray is in obsState SCANNING

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
endscan_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

GoToIdle()

Invokes GoToIdle command on CspSubarrayLeafNode.

class GoToIdleCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s GoToIdle() command.

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do()

This command invokes GoToIdle command on CSP Subarray in order to end current scheduling block.

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
gotoidle_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

class InitCommand(*args, **kwargs)

A class for the CspSubarrayLeafNode’s init_device() method”

do()

Initializes the attributes and properties of the CspSubarrayLeafNode.

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 error occurs in creating proxy for CSPSubarray.
ObsReset()

Invokes ObsReset command on cspsubarrayleafnode

class ObsResetCommand(*args, **kwargs)

A class for CSPSubarrayLeafNode’s ObsReset() command.

check_allowed()

Checks whether this command is allowed to be run in current device state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do()

Command to reset the CSP subarray and bring it to its RESETTING state.

Parameters:argin – None
Returns:None
Raises:DevFailed if error occurs while invoking the command on CSpSubarray.
obsreset_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

ReleaseAllResources()

Invokes ReleaseAllResources command on CspSubarrayLeafNode

class ReleaseAllResourcesCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s ReleaseAllResources() command.

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do()

It invokes RemoveAllReceptors command on CspSubarray and releases all the resources assigned to CspSubarray.

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
releaseallresources_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

Restart()

Invokes Restart command on cspsubarrayleafnode

class RestartCommand(*args, **kwargs)

A class for CSPSubarrayLeafNode’s Restart() command.

check_allowed()

Checks whether this command is allowed to be run in current device state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do()

This command invokes Restart command on CSPSubarray.

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 the command on CSpSubarray.
restart_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

StartScan(argin)

Invokes StartScan command on cspsubarrayleafnode

class StartScanCommand(*args, **kwargs)

A class for CspSubarrayLeafNode’s StartScan() command.

check_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
do(argin)

This command invokes Scan command on CspSubarray. It is allowed only when CspSubarray is in ObsState READY.

Parameters:argin – JSON string consists of scan id (int).

Example: {“id”:1}

Note: Enter the json string without spaces as a input.

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
startscan_cmd_ended_cb(event)

Callback function immediately executed when the asynchronous invoked command returns.

Parameters:

event – a CmdDoneEvent object. This class is used to pass data to the callback method in asynchronous callback model for command execution.

Type:

CmdDoneEvent object It has the following members:

  • device : (DeviceProxy) The DeviceProxy object on which the
    call was executed.
  • cmd_name : (str) The command name
  • argout_raw : (DeviceData) The command argout
  • argout : The command argout
  • err : (bool) A boolean flag set to true if the command
    failed. False otherwise
  • errors : (sequence<DevError>) The error stack
  • ext
Returns:

none

activityMessage

Used by autodoc_mock_imports.

always_executed_hook()

Internal construct of TANGO.

calculate_geometric_delays(time_t0)

This method calculates geometric delay values (in Second) using KATPoint library. It requires delay correction object, timestamp t0 and target RaDec. Numpy library is used to convert delay values (in Seconds) to fifth order polynomial coefficients. Six timestamps from the time-frame t0 to t+10, are used to calculate delays per antenna. These six delay values are then used to calculate fifth order polynomial coefficients. In order to calculate delays in advance, timestamp t0 is considered to be one minute ahead of the the current timestamp.

Parameters:argin – time_t0
Returns:Dictionary containing fifth order polynomial coefficients per antenna per fsp.
cspSubarrayObsState

Used by autodoc_mock_imports.

cspsubarrayHealthState

Used by autodoc_mock_imports.

delayModel

Used by autodoc_mock_imports.

delay_model_calculator(argin)

This method calculates the delay model for consumption of CSP subarray. The epoch value is the current timestamp value. Delay calculation starts when configure command is invoked. It calls the function which internally calculates delay values using KATPoint library and converts them to fifth order polynomial coefficients.

Parameters:argin – int. The argument contains delay model update interval in seconds.
Returns:None.
delete_device()

Internal construct of TANGO.

init_command_objects()

Initialises the command handlers for commands supported by this device.

is_Abort_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
is_AssignResources_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
is_Configure_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in

current device state

Return type:boolean
Raises:DevFailed if this command is not allowed to be run

in current device state

is_EndScan_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
is_GoToIdle_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in

current device state

Return type:boolean
Raises:DevFailed if this command is not allowed to be run

in current device state

is_ObsReset_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
is_ReleaseAllResources_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in

current device state

Return type:boolean
Raises:DevFailed if this command is not allowed to be run

in current device state

is_Restart_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in current device state
Return type:boolean
Raises:DevFailed if this command is not allowed to be run in current device state
is_StartScan_allowed()

Checks whether the command is allowed to be run in the current state

Returns:True if this command is allowed to be run in

current device state

Return type:boolean
Raises:DevFailed if this command is not allowed to be run

in current device state

read_activityMessage()

Internal construct of TANGO. Returns activity message.

read_delayModel()

Internal construct of TANGO. Returns the delay model.

read_versionInfo()

Internal construct of TANGO. Returns the version information.

update_config_params()

In this method parameters related to the resources assigned, are updated every time assign, release or configure commands are executed.

Parameters:argin – None
Returns:None
validate_obs_state()
versionInfo

Used by autodoc_mock_imports.

write_activityMessage(value)

Internal construct of TANGO. Sets the activity message.

write_delayModel(value)

Internal construct of TANGO. Sets in to the delay model.

tmcprototype.cspsubarrayleafnode.src.cspsubarrayleafnode.csp_subarray_leaf_node.main(args=None, **kwargs)

Runs the CspSubarrayLeafNode.

Parameters:
  • args – Arguments internal to TANGO
  • kwargs – Arguments internal to TANGO
Returns:

CspSubarrayLeafNode TANGO object.