ska_tmc_cspsubarrayleafnode.commands package

Submodules

ska_tmc_cspsubarrayleafnode.commands.csp_subarray_leaf_node_command_command module

Command class for CSP Subarray Leaf Node

This module defines a command class CspSLNCommand for the CSPSubarrayLeafNode The CspSLNCommand class provides implementation for commands that interact with the CSP Subarray Leaf Node It includes methods for initializing adapters, checking device responsiveness, and handling commands for both low-level and mid-level devices.

ska_tmc_cspsubarrayleafnode.commands.csp_subarray_leaf_node_command.LOGGER

The logger for the module.

Type:

logging.Logger

class ska_tmc_cspsubarrayleafnode.commands.csp_subarray_leaf_node_command.CspSLNCommand(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeCommand

Abstract command class for all CspSubarrayLeafNode

do(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Handle a command.

Parameters:

argin (str, optional) – Command argument. Defaults to None.

Returns:

A tuple containing the result code and message.

Return type:

Tuple[ResultCode, str]

do_low(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Abstract Method from TmcLeafNodeCommand is defined here but not utilized by this Class. :param argin: Accepts argument if required. :type argin: _type_, optional :param Defaults to None.:

do_mid(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Abstract Method from TmcLeafNodeCommand is defined here but not utilized by this Class. :param argin: Accepts argument if required. :type argin: _type_, optional :param Defaults to None.:

get_obs_state_lrcr() Tuple[ska_control_model.ObsState, Optional[ska_tango_base.commands.ResultCode]]

Get Current device obsState for LRCR

Returns:

Current device obsState ResultCode: Result code for obsState

Return type:

ObsState

init_adapter() Tuple[ska_tango_base.commands.ResultCode, str]

Creates adapter for underlying CSP subarray device.

Returns:

A tuple containing the result code and message.

Return type:

Tuple[ResultCode, str]

init_adapter_low()

Initialize the adapter for the low-level device.

init_adapter_mid()

Initialize the adapter for the low-level device.

reset_delay_model_attribute(delay_json: dict) None

Method to reset delayModel attribute value to empty delayModel json

Parameters:

delay_json (dict) – delay json

set_command_id(command_name: str)

Sets the command id for error propagation.

Parameters:

command_name (str) – name of the command.

stop_delay_calculation() None

Method to stop the delayModel calculation thread and reset the timer parameters

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

validate_abort_completion() bool

Check whether the abort command completion criteria is met. :return: boolean :rtype: bool

wait_for_completion(desired_state=None, device_length: int = 1, state_getter=None, check_command_results=True) Tuple[ska_tango_base.commands.ResultCode, str]

Wait for command completion using CommandCompletionTracker

Parameters:
  • desired_obs_state (ObsState) – Expected observation state after

  • execution (command) –

  • device_length (int) – Number of devices to wait for completion

  • 1) ((default is) –

  • state_getter (callable) – Function to get the current state of the device

  • check_command_results (bool) – Whether to check command results for determining command completion (default is True)

Returns:

Final result code and corresponding message

Return type:

Tuple[ResultCode, str]

ska_tmc_cspsubarrayleafnode.commands.csp_subarray_leaf_node_command.task_callback_default(**kwargs) None

Default method if the taskcallback is not passed

Parameters:
  • status – status of the task.

  • progress – progress of the task.

  • result – result of the task.

  • exception – an exception raised from the task.

ska_tmc_cspsubarrayleafnode.commands.assign_resources_command module

AssignResources command class for CspSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.assign_resources_command.AssignResources(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarayLeafNode’s AssignResources() command.

It accepts subarrayID and receptor IDs in JSON string format and invokes the AssignResources command on the CSP Subarray.

assign_resources(argin: str, task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

This is a long running method for AssignResources command, it executes do hook, invokes AssignResources command on CspSubarray.

Parameters:
  • argin (str) – Input JSON string containing command parameters.

  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

do_low(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke the AssignResources command on the CSP low Subarray

Parameters:

argin (str) –

The string in JSON format. The JSON contains the following values:

  • subarray_id: integer.

Example:

{"interface":
"https://schema.skao.int/ska-low-csp-assignresources/2.0",
"common":{"subarray_id":1},"lowcbf":{"resources":
[{"device":"fsp_01",
"shared":true, "fw_image":"pst","fw_mode":"unused"},
{"device":"p4_01",
"shared":true,"fw_image":"p4.bin","fw_mode":"p4"}]},}

Note

Enter the JSON string without spaces as an input.

Returns:

A tuple containing the result code and a message.

Return type:

Tuple[ResultCode, str]

Raises:

Exception – If the command execution is not successful.

do_mid(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke AssignResources command on CSP Subarray.

Parameters:

argin (str) –

The string in JSON format. The JSON contains the following values:

  • subarray_id: integer.

  • dish: Mandatory JSON object consisting of receptor_ids.

Example:

{
"interface":
"https://schema.skao.int/ska-mid-csp-assignresources/3.1",
"subarray_id":1,"dish":{"receptor_ids":["SKA001","SKA036"]}
"pst":{"pst_beam_ids": [1]}}

Note

Enter the JSON string without spaces as an input.

Returns:

A tuple containing the result code and a message.

Return type:

Tuple[ResultCode, str]

Raises:

Exception – If the command execution is not successful.

validate_json_argument(input_argin: dict[str, Any]) Tuple[ska_tango_base.commands.ResultCode, str]

Validates the JSON argument for the AssignResources command.

Parameters:

input_argin (dict[str, Any]) – Input JSON argument as a dictionary.

Returns:

A tuple containing the result code and a message.

Return type:

Tuple[ResultCode, str]

validate_json_argument_low(input_argin: dict[str, Any]) Tuple[ska_tango_base.commands.ResultCode, str]

Validates the JSON argument for the AssignResources command for CSP low.

Parameters:

input_argin (dict[str, Any]) – Input JSON argument as a dictionary.

Returns:

A tuple containing the result code and a message.

Return type:

Tuple[ResultCode, str]

ska_tmc_cspsubarrayleafnode.commands.release_all_resources_command module

ReleaseAllResources command class for CSPSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.release_all_resources_command.ReleaseAllResources(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarayLeafNode’s ReleaseAllResources() command.

Releases all the resources of given CSP Subarray Leaf Node.

do_low() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke ReleaseAllResources command on CSP Subarray.

Parameters:

argin – DevString. The string in JSON format. Defaults to None.

Returns:

(ResultCode, message)

Raises:

Exception – if the command execution is not successful

do_mid() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke ReleaseAllResources command on CSP Subarray.

Parameters:

argin – DevString. The string in JSON format. Defaults to None.

Returns:

(ResultCode, message)

Raises:

Exception – if the command execution is not successful

release_all_resources(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

it executes do hook, invoking ReleaseAllResources command.

Parameters:
  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

ska_tmc_cspsubarrayleafnode.commands.configure_command module

Configure command class for CSPSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.configure_command.Configure(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarayLeafNode’s Configure() command.

It accepts CSP configuration in JSON string format and invokes Configure command on CSP Subarray.

configure(argin: str, task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Optional[Tuple[ska_tango_base.commands.ResultCode, str]]

Executes do hook, invoking Configure command.

Parameters:
  • argin (str) – Input JSON string containing command parameters.

  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

do_low(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Configure command on CSP low Subarray.

Parameters:

argin (str) – The string in JSON format. The JSON contains following values:

Example JSON for Configure low
{
  "interface": "https://schema.skao.int/ska-low-tmc-configure/6.0",
  "mccs": {
    "subarray_beams": [
      {
        "subarray_beam_id": 1,
        "update_rate": 0.0,
        "logical_bands": [{
          "start_channel": 80,
          "number_of_channels": 16
        }, {
          "start_channel": 384,
          "number_of_channels": 16
        }],
        "apertures": [{
          "aperture_id": "AP001.01",
          "weighting_key_ref": "default",
          "calibration_id": "default"
        }, {
          "aperture_id": "AP001.02",
          "weighting_key_ref": "default",
          "calibration_id": "default"
        }, {
          "aperture_id": "AP002.01",
          "weighting_key_ref": "default",
          "calibration_id": "default"
        }, {
          "aperture_id": "AP002.02",
          "weighting_key_ref": "default",
          "calibration_id": "default"
        }, {
          "aperture_id": "AP003.01",
          "weighting_key_ref": "default",
          "calibration_id": "default"
        }],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 2,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 96,
            "number_of_channels": 16
          },
          {
            "start_channel": 400,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP003.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP004.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 3,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 112,
            "number_of_channels": 16
          },
          {
            "start_channel": 416,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP005.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP006.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 4,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 128,
            "number_of_channels": 16
          },
          {
            "start_channel": 432,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP007.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP008.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 5,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 80,
            "number_of_channels": 16
          },
          {
            "start_channel": 384,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP009.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP010.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 6,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 96,
            "number_of_channels": 16
          },
          {
            "start_channel": 400,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP011.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP012.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 7,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 112,
            "number_of_channels": 16
          },
          {
            "start_channel": 416,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP013.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP014.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      },
      {
        "subarray_beam_id": 8,
        "update_rate": 0.0,
        "logical_bands": [
          {
            "start_channel": 128,
            "number_of_channels": 16
          },
          {
            "start_channel": 432,
            "number_of_channels": 16
          }
        ],
        "apertures": [
          {
            "aperture_id": "AP015.01",
            "weighting_key_ref": "aperture2"
          },
          {
            "aperture_id": "AP016.01",
            "weighting_key_ref": "aperture2"
          }
        ],
        "field": {
          "target_name": "Polaris Australis",
          "reference_frame": "icrs",
          "attrs": {
            "c1": 317.199,
            "c2": -88.95636
          }
        }
      }
  ]
  },
  "sdp": {
    "interface": "https://schema.skao.int/ska-sdp-configure/1.1",
    "scan_type": "target:a"
  },
  "csp": {
    "interface": "https://schema.skao.int/ska-low-csp-configure/7.3",
    "common": {
      "config_id": "sbi-mvp01-20200325-00001-science_A",
      "eb_id": "eb-test-20220916-00000",
      "subarray_id": 1
    },
    "lowcbf": {
      "stations": {
        "stns": [
          [1, 1],
          [2, 1],
          [3, 1],
          [4, 1],
          [5, 1],
          [6, 1]
        ],
        "stn_beams": [
          {
            "beam_id": 1,
            "freq_ids": [
              400
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelStationBeam01"
          },
          {
            "beam_id": 2,
            "freq_ids": [
              400
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelStationBeam02"
          },
          {
            "beam_id": 3,
            "freq_ids": [
              400
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelStationBeam03"
          },
          {
            "beam_id": 4,
            "freq_ids": [
              400
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelStationBeam04"
          }
        ]
      },
      "vis": {
        "fsp": {
          "firmware": "vis",
          "fsp_ids": [
            1
          ]
        },
        "stn_beams": [
          {
            "stn_beam_id": 1,
            "integration_ms": 849,
            "host": [
              [
                0,
                "192.168.0.1"
              ],
              [
                2000,
                "192.168.0.2"
              ]
            ],
            "port": [
              [
                0,
                9000,
                1
              ],
              [
                20,
                9001,
                1
              ]
            ]
          }
        ]
      },
      "timing_beams": {
        "firmware": "pst",
        "beams": [
          {
            "pst_beam_id": 1,
            "field": {
              "target_name": "PSR J0024-7204R",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "pm_c1": 4.8,
                "pm_c2": -3.3
              }
            },
            "stn_beam_id": 1,
            "stn_weights": [
              0.9,
              1.0,
              1.0,
              1.0,
              0.9,
              1.0
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelPSTBeam1",
            "jones": "tango://jones.skao.int/low/stn-beam/1"
          },
          {
            "pst_beam_id": 2,
            "field": {
              "target_name": "PSR J0024-7204R",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "pm_c1": 4.8,
                "pm_c2": -3.3
              }
            },
            "stn_beam_id": 2,
            "stn_weights": [
              0.9,
              1.0,
              1.0,
              1.0,
              0.9,
              1.0
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelPSTBeam2",
            "jones": "tango://jones.skao.int/low/stn-beam/1"
          }
        ]
      },
      "search_beams": {
        "firmware": "pss",
        "beams": [
          {
            "pss_beam_id": 1,
            "stn_beam_id": 1,
            "stn_weights": [
              0.9,
              1.0,
              1.0,
              1.0,
              0.9,
              1.0
            ],
            "delay_poly": "low-tmc/subarray-leaf-node-csp/01/delayModelPSSBeam1",
            "jones": "tango://jones.skao.int/low/stn-beam/1"
          }
        ]
      }

    },
    "pst": {
      "beams": [
        {
          "beam_id": 1,
          "scan": {
            "centre_frequency": 200000000.0,
            "total_bandwidth": 1562500.0,
            "pst_processing_mode": "VOLTAGE_RECORDER",
            "observer_id": "jdoe",
            "project_id": "project1",
            "target": {
              "target_name": "J1921+2153",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "epoch": 2000.0
              }
            },
            "receiver_id": "receiver3",
            "max_scan_length": 20000.0,
            "subint_duration": 30.0,
            "receptors": [
              "receptor1",
              "receptor2"
            ],
            "receptor_weights": [
              0.4,
              0.6
            ],
            "rfi_frequency_masks": [],
            "delay_centre": [
              -2565044.433249,
              5085763.694774,
              -2861062.439952
            ]
          }
        },
        {
          "beam_id": 2,
          "scan": {
            "centre_frequency": 200000000.0,
            "total_bandwidth": 1562500.0,
            "pst_processing_mode": "VOLTAGE_RECORDER",
            "observer_id": "jdoe",
            "project_id": "project1",
            "target": {
              "target_name": "J1921+2153",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "epoch": 2000.0
              }
            },
            "receiver_id": "receiver3",
            "max_scan_length": 20000.0,
            "subint_duration": 30.0,
            "receptors": [
              "receptor1",
              "receptor2"
            ],
            "receptor_weights": [
              0.4,
              0.6
            ],
            "rfi_frequency_masks": [],
            "delay_centre": [
              -2565044.433249,
              5085763.694774,
              -2861062.439952
            ]
          }
        },
        {
          "beam_id": 3,
          "scan": {
            "centre_frequency": 200000000.0,
            "total_bandwidth": 1562500.0,
            "pst_processing_mode": "VOLTAGE_RECORDER",
            "observer_id": "jdoe",
            "project_id": "project1",
            "target": {
              "target_name": "J1921+2153",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "epoch": 2000.0
              }
            },
            "receiver_id": "receiver3",
            "max_scan_length": 20000.0,
            "subint_duration": 30.0,
            "receptors": [
              "receptor1",
              "receptor2"
            ],
            "receptor_weights": [
              0.4,
              0.6
            ],
            "delay_centre": [
              -2565044.433249,
              5085763.694774,
              -2861062.439952
            ],
            "rfi_frequency_masks": []
          }
        },
        {
          "beam_id": 4,
          "scan": {
            "delay_centre": [
              -254.433249,
              5083.694774,
              -21062.439952
            ],
            "centre_frequency": 200000000.0,
            "total_bandwidth": 1562500.0,
            "pst_processing_mode": "VOLTAGE_RECORDER",
            "observer_id": "jdoe",
            "project_id": "project1",
            "target": {
              "target_name": "J1921+2153",
              "reference_frame": "icrs",
              "attrs": {
                "c1": 6.023625,
                "c2": -72.08128333,
                "epoch": 2000.0
              }
            },
            "receiver_id": "receiver3",
            "max_scan_length": 20000.0,
            "subint_duration": 30.0,
            "receptors": [
              "receptor1",
              "receptor2"
            ],
            "receptor_weights": [
              0.4,
              0.6
            ],
            "rfi_frequency_masks": []
          }
        }
      ]
    },
    "pss": {
      "beam": [{
        "beam_id": 1,
        "reference_frame": "ICRS",
        "ra": 82.75,
        "dec": 21.0,
        "centre_frequency": 1400.0,
        "beam_delay_centre": "-254.433249,5083.694774,-21062.439952",
        "dest_host": "192.168.178.25",
        "dest_port": 9021
      }],
      "config_id": 1,
      "cheetah": [{
        "cheetah_id": 1,
        "beams": [{
          "beam": {
            "active": true,
            "sinks": {
              "channels": {
                "sps_events": {
                  "active": true,
                  "sink": [{
                    "sink_id": "spccl_files"
                  }, {
                    "sink_id": "candidate_files"
                  }]
                }
              },
              "sink_configs": {
                "spccl_files": {
                  "extension": ".spccl",
                  "dir": "/tmp/beam1",
                  "sink_id": "spccl_files"
                },
                "spccl_sigproc_files": {
                  "spectra_per_file": 0,
                  "dir": "/tmp/beam1",
                  "extension": ".fil",
                  "candidate_window": {
                    "ms_before": 500.0,
                    "ms_after": 1000.0
                  },
                  "sink_id": "candidate_files"
                }
              }
            },
            "source": {
              "sigproc": {
                "file": "filterbank1.fil",
                "chunk_samples": 1024,
                "default-nbits": 8,
                "active": true
              },
              "udp_low": {
                "number_of_threads": 2,
                "spectra_per_chunk": 2048,
                "number_of_channels": 7776,
                "max_buffers": 1,
                "active": false
              },
              "udp_low_lite": {
                "number_of_threads": 10,
                "spectra_per_chunk": 32768,
                "number_of_channels": 432,
                "max_buffers": 3,
                "active": false
              }
            },
            "beam_id": 1
          }
        }],
        "psbc": {
          "dump_time": 540
        },
        "acceleration": {
          "fdas": {
            "pool_id": "default",
            "priority": 0,
            "active": false,
            "labyrinth": {
              "active": true,
              "threshold": 10.0
            }
          }
        },
        "sift": {
          "pool_id": "default",
          "priority": 2,
          "strong_sift": {
            "active": true,
            "num_candidate_harmonics": 8,
            "match_factor": 0.001,
            "dm_match_range": 2
          }
        }
      }],
      "ddtr": {
        "cpu": {
          "active": false
        },
        "fpga": {
          "active": false
        },
        "gpu_bruteforce": {
          "active": false,
          "copy_dmtrials_to_host": true
        },
        "klotski": {
          "active": true
        },
        "klotski_bruteforce": {
          "active": false
        },
        "dedispersion": [{
          "start": 0.0,
          "end": 100.0,
          "step": 0.1
        }, {
          "start": 100.0,
          "end": 300.0,
          "step": 0.2
        }, {
          "start": 300.0,
          "end": 700.0,
          "step": 0.4
        }, {
          "start": 700.0,
          "end": 1500.0,
          "step": 0.8
        }, {
          "start": 1500.0,
          "end": 3100.0,
          "step": 1.6
        }],
        "dedispersion_samples": 131072
      },
      "sps": {
        "cpu": {
          "active": false,
          "samples_per_iteration": 1,
          "number_of_widths": 1
        },
        "threshold": 8.0,
        "klotski": {
          "active": false,
          "pulse_widths": "1,2,4,8,16,32,64,128"
        },
        "klotski_bruteforce": {
          "active": false,
          "pulse_widths": "1,2,4,8,16,32,64,128"
        }
      }
    }
  },
  "tmc": {
    "scan_duration": 10.0
  },
  "layout_data": {
    "interface": "https://schema.skao.int/ska-telmodel-layout/1.1",
    "telescope": "ska1_low",
    "receptors": [
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2565124.7717066384,
            "y": 5085647.529621617,
            "z": -2861207.079154239
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.826162,
            "lon": 116.765696,
            "h": 370.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 1,
        "station_label": "C1"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2564996.841508992,
            "y": 5085851.958070379,
            "z": -2860957.8376849536
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.823646,
            "lon": 116.763621,
            "h": 369.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 2,
        "station_label": "C2"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2565098.7808214836,
            "y": 5085715.205306626,
            "z": -2861106.30519967
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.825152,
            "lon": 116.765156,
            "h": 368.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 3,
        "station_label": "C3"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2564914.079873161,
            "y": 5085802.216175113,
            "z": -2861112.719997803
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.825226,
            "lon": 116.763103,
            "h": 366.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 4,
        "station_label": "C4"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2565046.8711660723,
            "y": 5085765.270041939,
            "z": -2861057.4874787643
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.824672,
            "lon": 116.764463,
            "h": 365.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 5,
        "station_label": "C5"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2565058.3019571467,
            "y": 5085861.448743192,
            "z": -2860886.3441106305
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.822923,
            "lon": 116.76413,
            "h": 369.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 6,
        "station_label": "C6"
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 38.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": -2565044.433249,
            "y": 5085763.694774,
            "z": -2861062.439952
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -26.824722084,
            "lon": 116.76444824,
            "h": 365.0
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_id": 0,
        "station_label": "AC"
      }
    ]
  }
}

Note

Enter the json string without spaces as a input.

Returns:

(ResultCode, message)

do_mid(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Configure command on CSP Subarray.

Parameters:

argin (str) – The string in JSON format. The JSON contains following values:

Example JSON for Configure mid
{
  "interface": "https://schema.skao.int/ska-csp-configurescan/4.1",
  "common": {
    "config_id": "4 receptor, band 1, 1 FSP, no options",
    "frequency_band": "1",
    "subarray_id": 1
  },
  "midcbf": {
    "correlation": {
      "processing_regions": [
        {
          "fsp_ids": [
            1,
            2
          ],
          "start_freq": 350000000,
          "channel_width": 13440,
          "channel_count": 14880,
          "integration_factor": 1,
          "sdp_start_channel_id": 0,
          "output_link_map": [
            [
              0,
              1
            ]
          ],
          "output_host": [
            [
              0,
              "192.168.0.1"
            ],
            [
              2000,
              "192.168.0.2"
            ]
          ],
          "output_port": [
            [
              0,
              9000
            ],
            [
              20,
              9001
            ]
          ]
        }
      ]
    },
    "delay_model_subscription_point": "mid-tmc/subarray-leaf-node-csp/01/delayModel"
  },
  "pointing": {
    "target": {
      "ra": "21:08:47.92",
      "dec": "-88:57:22.9",
      "target_name": "Polaris Australis",
      "reference_frame": "ICRS"
    }
  },
  "layout_data": {
    "interface": "https://schema.skao.int/ska-telmodel-layout/1.1",
    "telescope": "ska1_mid",
    "receptors": [
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 15.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": 5109058.062517257,
            "y": 2007302.435599506,
            "z": -3239167.000445203
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -30.71329,
            "lon": 21.449412,
            "h": 1098.074
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_label": "SKA001",
        "station_id": 65
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 15.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": 5109485.764101352,
            "y": 2007047.2578047263,
            "z": -3238642.442898495
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -30.707819,
            "lon": 21.4453007,
            "h": 1092.219
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_label": "SKA036",
        "station_id": 100
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 15.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": 5109582.868562024,
            "y": 2006050.1820834554,
            "z": -3239102.4384762375
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -30.712648,
            "lon": 21.4352434,
            "h": 1091.496
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_label": "SKA063",
        "station_id": 127
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 15.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": 5108866.3389067985,
            "y": 2007188.4485121474,
            "z": -3239543.4861485804
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -30.717223,
            "lon": 21.4490364,
            "h": 1101.125
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_label": "SKA100",
        "station_id": 164
      },
      {
        "interface": "https://schema.skao.int/ska-telmodel-layout-receptor/1.1",
        "diameter": 15.0,
        "location": {
          "interface": "https://schema.skao.int/ska-telmodel-layout-location/1.0",
          "geocentric": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geocentric/1.0",
            "coordinate_frame": "ITRF",
            "x": 5109272.111387361,
            "y": 2006809.1341156,
            "z": -3239131.127679056
          },
          "geodetic": {
            "interface": "https://schema.skao.int/ska-telmodel-layout-geodetic/1.0",
            "coordinate_frame": "WGS84",
            "lat": -30.71292499,
            "lon": 21.44380263,
            "h": 1095.967
          }
        },
        "fixed_delays": [
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_H",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          },
          {
            "interface": "https://schema.skao.int/ska-telmodel-layout-receptor-fixed-delay/0.0",
            "fixed_delay_id": "FIX_V",
            "polarisation": 0,
            "units": "m",
            "delay": 0.0
          }
        ],
        "niao": 0.0,
        "station_label": "AC",
        "station_id": 0
      }
    ]
  }
}

It also supports PST configuration from schema version 8.3.

Example JSON for PST Scan Configuration
{
  "interface": "https://schema.skao.int/ska-csp-configurescan/8.3",
  "common": {
    "config_id": "sbi-mvp01-20200325-00001-science_A",
    "frequency_band": "2",
    "eb_id": "eb-m001-20230712-56789"
  },
  "pst": {
    "beams": [
      {
        "beam_id": 1,
        "scan": {
          "centre_frequency": 10550000000.0,
          "total_bandwidth": 2496345600.0,
          "observer_id": "jdoe",
          "project_id": "project1",
          "receiver_id": "receiver3",
          "max_scan_length": 20000.0,
          "subint_duration": 30.0,
          "receptors": [
            "SKA001",
            "SKA036"
          ],
          "receptor_weights": [
            0.4,
            0.6
          ],
          "pst_processing_mode": "FLOW_THROUGH",
          "delay_centre": [
            5109272.111387361,
            2006809.1341156,
            -3239131.127679056
          ],
          "target": {
            "target_name": "J1921+2153",
            "reference_frame": "icrs",
            "attrs": {
              "c1": 290.43672917,
              "c2": 21.884,
              "epoch": 2000.0
            }
          },
          "ft": {
            "channel_polarisation_selection": {
              "channels": [
                0,
                100
              ],
              "polarisations": "Both"
            },
            "rescale": {
              "algorithm": "MedianMAD",
              "periodic_update": true,
              "timescale": 1.0
            },
            "requantisation": {
              "num_bits_out": 4,
              "scale": 1.0
            }
          }
        }
      }
    ]
  },
  "transaction_id": "txn-....-00001",
  "midcbf": {
    "correlation": {
      "processing_regions": [
        {
          "fsp_ids": [
            1
          ],
          "start_freq": 950000000,
          "channel_width": 13440,
          "channel_count": 40,
          "sdp_start_channel_id": 0,
          "integration_factor": 1,
          "output_link_map": [
            [
              0,
              1
            ]
          ],
          "output_host": [
            [
              0,
              "192.168.0.1"
            ],
            [
              2000,
              "192.168.0.2"
            ]
          ],
          "output_port": [
            [
              0,
              9000
            ],
            [
              20,
              9001
            ]
          ]
        }
      ]
    },
    "delay_model_subscription_point": "mid-tmc/subarray-leaf-node-csp/01/delayModel",
    "pst_bf": {
      "processing_regions": [
        {
          "fsp_ids": [
            5
          ],
          "start_freq": 495075840,
          "channel_count": 3700,
          "pst_start_channel_id": 0,
          "timing_beams": [
            {
              "timing_beam_id": 1,
              "receptors": [
                "SKA001",
                "SKA036"
              ],
              "output_link_map": [
                [
                  0,
                  1
                ]
              ],
              "output_port": [
                [
                  0,
                  9000
                ]
              ],
              "output_host": [
                [
                  0,
                  "192.168.1.1"
                ]
              ]
            }
          ]
        }
      ]
    }
  },
  "pointing": {
    "target": {
      "ra": "21:08:47.92",
      "dec": "-88:57:22.9",
      "target_name": "Polaris Australis",
      "reference_frame": "ICRS"
    }
  }
}

Note

Enter the json string without spaces as a input.

Returns:

(ResultCode, message)

Raises:
  • Exception – if the command execution is not successful.

  • DevFailed – if the command execution is not successful.

  • ValueError – if input argument json string contains invalid value.

generate_pss_beam_station_mapping(argin_json: dict) dict

Function to generate a mapping between PSS beam id & Station beam id

Parameters:

argin_json – Configure JSON data.

Returns:

Mapping of pss_beam_id and stn_beam_id

generate_pst_beam_station_mapping(argin_json: dict) dict

Function to generate a mapping between PST beam id & Station beam id

Parameters:

argin_json – Configure JSON data.

Returns:

Mapping of pst_beam_id and stn_beam_id

load_low_configure_json(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]

Method loads low configure json.

Parameters:

argin (str) – Input JSON string

Returns:

Tuple[ResultCode, str]: result code and message

manage_pss_beams_configuration(pss_beams: list) None

Function to retrieve data from json, and assign to necessary attributes of component manager for PSS beams.

Parameters:

pss_beam – list of the pss beams from configure json.

manage_pst_beams_configuration(timing_beams: list) None

Function to retrieve data from json, and assign to necessary attributes of component manager for PST beams.

Parameters:

timing_beams – list of timing beams from configure json.

remove_field_section_from_low_configure_json(argin_json) dict

Function to remove field section before sending the json to low cbf

Parameters:

argin_json (dict) – The json in dict format

Returns:

The dictionary without field key.

set_config_id(config_id: int) Tuple[ska_tango_base.commands.ResultCode, str]

This method sets configuration id.

Parameters:

argin (int) – configuration id.

Returns:

(ResultCode, message)

set_target_low(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]

Set targets + optional PST/PSS beam collectors for LOW.

set_target_mid(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]

This method sets target and creates katpoint target object.

Parameters:

argin (str) – The string in JSON format.

Returns:

(ResultCode, message)

start_delay(argin: str) Tuple[ska_tango_base.commands.ResultCode, str]

A method to start delay thread and starts generating delay polynomials.

Parameters:

argin (str) – Input JSON string

Returns:

Tuple[ResultCode, str]: result code and message

update_station_ids(argin_json: dict) Tuple[ska_tango_base.commands.ResultCode, str]

Method to extract station IDs from MCCS apertures and update station IDs from component manager.

Parameters:

argin_json (dict) – MCCS configuration dict

Returns:

Result code and message

ska_tmc_cspsubarrayleafnode.commands.end_command module

End command class for CSPSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.end_command.End(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarayLeafNode’s End() command.

It invokes End command on CSP Subarray.

do_low() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke End command on CSP Subarray.

Parameters:

argin – None.

Returns:

(ResultCode, message)

Raises:

Exception – if the command execution is not successful

do_mid() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke End command on CSP Subarray.

Parameters:

argin – None.

Returns:

(ResultCode, message)

Raises:

Exception – if the command execution is not successful

end(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

This is a long running method for End command, it executes do hook, invokes End command on CspSubarray.

Parameters:
  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

ska_tmc_cspsubarrayleafnode.commands.scan_command module

Scan command class for CspSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.scan_command.Scan(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarrayLeafNode’s Scan() command. Scan command is inherited from CspSLNCommand.

This command invokes Scan command on CSP Subarray.

do_low(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Scan command on CSP Low Subarray.

Parameters:

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

Example:

{"interface": "https://schema.skao.int/ska-low-csp-scan/3.2",
"transaction_id": "txn-....-00001",
"common":{"subarray_id":1},"lowcbf":{"scan_id":987654321},
"start_time": "2025-12-23T08:25:00.412Z"}

Note

Enter the json string without spaces as a input.

Returns:

(ResultCode, message)

do_mid(argin: str = '') Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Scan command on CSP Mid Subarray.

Parameters:

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

Example:

{"interface":"https://schema.skao.int/ska-csp-scan/2.2",
"scan_id":1,"start_time": "2025-12-23T08:25:00.412Z"}

Note

Enter the json string without spaces as a input.

Returns:

(ResultCode, message)

scan(argin: str, task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

This is a long running method for Scan command, it executes do hook, invokes Scan command on CspSubarray.

Parameters:
  • argin (str) – Input JSON string containing command parameters.

  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

validate_json_argument(input_argin: str) tuple

Validates the json argument

Parameters:

input_argin (str) – key to be validated

validate_json_argument_low(input_argin: dict) tuple

Validates the json argument for low

Parameters:

input_argin (str) – key to be validated

ska_tmc_cspsubarrayleafnode.commands.end_scan_command module

EndScan command class for CspSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.end_scan_command.EndScan(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarrayLeafNode’s EndScan() command.

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

do_low() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke EndScan command on CSP Low Subarray.

Parameters:

argin (String) – Json input string, defaults to None

Returns:

(ResultCode, message)

do_mid() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke EndScan command on CSP Mid Subarray.

Parameters:

argin (String) – Json input string, defaults to None

Returns:

(ResultCode, message)

end_scan(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

This is a long running method for EndScan command, it executes do hook, invokes EndScan command on CspSubarray.

Parameters:
  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

ska_tmc_cspsubarrayleafnode.commands.abort_command module

Abort Command for CspSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.abort_command.Abort(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarrayLeafNode’s Abort() command. Aborts the CSP Subarray device.

do() Tuple[ska_tango_base.commands.ResultCode, str]

This method 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:

Tuple[ResultCode, str]

Raises:

Exception – if error occurs in invoking command on any of the devices like CspSubarrayLeafNode

invoke_abort(task_callback: ska_tango_base.base.TaskCallbackType = <function task_callback_default>, task_abort_event: ~typing.Optional[~threading.Event] = None)

This method calls do for Abort command

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

ska_tmc_cspsubarrayleafnode.commands.restart_command module

Restart command class for CspSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.restart_command.Restart(*args: Any, **kwargs: Any)

Bases: CspSLNCommand

A class for CspSubarrayLeafNode’s Restart command. Restarts the CSP Subarray device.

do() Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Restart command on CSP Subarray.

Returns:

(ResultCode, message)

restart(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) Tuple[ska_tango_base.commands.ResultCode, str]

This is a long running method for Restart command, it executes do hook, invokes Restart command on the CspSubarray.

Parameters:
  • task_callback (Optional[TaskCallbackType], optional) – Callback for task updates.

  • task_abort_event (optional) – Event to signal task abortion.

Returns:

Result code and message.

Return type:

Tuple[ResultCode, str]

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

ska_tmc_cspsubarrayleafnode.commands.set_csp_subarray_admin_mode module

SetAdminMode command class for CSPSubarrayLeafNode.

class ska_tmc_cspsubarrayleafnode.commands.set_csp_subarray_admin_mode.SetAdminMode(*args: Any, **kwargs: Any)

Bases: CspSLNCommand, FastCommand

A class for CspSubarrayLeafNode’s SetAdminMode() command.

SetAdminMode command on CspSubarrayLeafNode enables to set the adminMode of the csp subarray device

do(argin: ska_control_model.AdminMode) Tuple[ska_tango_base.commands.ResultCode, str]

A method to set the adminMode of the CSP Subarray device

Parameters:

argin (AdminMode) – A adminMode enum value to be set for subarray device

Returns:

Tuple of Resultcode and message

Return type:

Tuple[ResultCode, str]

Module contents