ska_oso_scripting.pdm_transforms

The pdm_transforms module contains code to transform Project Data Model (PDM) entities to Configuration Data Model (CDM) entities. The pdm_transforms code is called by observing scripts to convert the PDM Scheduling Block to the equivalent CDM configurations, which are then sent to TMC devices to control the telescope.

ska_oso_scripting.pdm_transforms.csp.convert_mid_csp_configuration(pdm_csp_config: ska_oso_pdm.sb_definition.csp.CSPConfiguration) ska_tmc_cdm.messages.subarray_node.configure.csp.CSPConfiguration[source]

Converts the relevant parts of a Mid SBDefinition into a CDM CSPConfiguration.

ska_oso_scripting.pdm_transforms.csp.create_low_csp_configuration(scan_number: int, sbd: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.subarray_node.configure.csp.CSPConfiguration[source]

Converts the relevant parts of a Low SBDefinition into a CDM CSPConfiguration.

The pdm_transforms module contains code to transform Project Data Model (PDM) entities to Configuration Data Model (CDM) entities. The pdm_transforms code is called by observing scripts to convert the PDM Scheduling Block to the equivalent CDM configurations, which are then sent to TMC devices to control the telescope.

ska_oso_scripting.pdm_transforms.mccs.create_mccs_allocation(sbd: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.central_node.mccs.MCCSAllocate[source]

Creates an CDM MCCSAllocate instance from the relevant parts of the SBDefinition.

ska_oso_scripting.pdm_transforms.mccs.create_mccs_configuration(scan_number: int, sbd: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.subarray_node.configure.mccs.MCCSConfiguration[source]

Create a CDM MCCSConfiguration for the given scan in the Low SBDefinition.

ska_oso_scripting.pdm_transforms.mccs.get_allocation_apertures(subarray_beam: ska_oso_pdm.sb_definition.mccs.mccs_allocation.SubarrayBeamConfiguration) list[ska_tmc_cdm.messages.central_node.mccs.ApertureConfiguration][source]

Get the apertures from one of the subArray beam of MCC Allocation

ska_oso_scripting.pdm_transforms.mccs.get_sky_coordinates_based_on_reference_coordinates(target: ska_oso_pdm.sb_definition.Target) ska_tmc_cdm.messages.subarray_node.configure.mccs.SubarrayBeamSkyCoordinates[source]

Get the sky coordinates based on target reference_coordinates from the SB

The pdm_transforms module contains code to transform Project Data Model (PDM) entities to Configuration Data Model (CDM) entities. The pdm_transforms code is called by observing scripts to convert the PDM Scheduling Block to the equivalent CDM configurations, which are then sent to TMC devices to control the telescope.

ska_oso_scripting.pdm_transforms.dish.convert_pointingconfiguration(target: ska_oso_pdm.sb_definition.Target, correction: ska_oso_pdm.sb_definition.PointingCorrection, dish_allocation: ska_oso_pdm.sb_definition.DishAllocation, wrap_sector: int | None = None) ska_tmc_cdm.messages.subarray_node.configure.PointingConfiguration[source]

Convert a PDM Target to the equivalent TMC configuration.

ska_oso_scripting.pdm_transforms.dish.create_dishconfiguration(midcbf_configuration: ska_oso_pdm.sb_definition.csp.midcbf.MidCBFConfiguration) ska_tmc_cdm.messages.subarray_node.configure.DishConfiguration[source]

Convert a PDM Dish configuration to a CDM Dish Configuration

ska_oso_scripting.pdm_transforms.dish.convert_dishallocation(dish_allocation: ska_oso_pdm.sb_definition.DishAllocation) ska_tmc_cdm.messages.central_node.common.DishAllocation[source]

Convert a PDM DishAllocation to the equivalent CDM DishAllocation.

The pdm_transforms module contains code to transform Project Data Model (PDM) entities to Configuration Data Model (CDM) entities. The pdm_transforms code is called by observing scripts to convert the PDM Scheduling Block to the equivalent CDM configurations, which are then sent to TMC devices to control the telescope.

ska_oso_scripting.pdm_transforms.common.convert_tmcconfiguration(scan_definition: ska_oso_pdm.sb_definition.ScanDefinition) ska_tmc_cdm.messages.subarray_node.configure.tmc.TMCConfiguration[source]

Convert a PDM ScanDefinition to the equivalent TMC configuration

The pdm_transforms.sdp module contains code to create SDP Configuration Data Model (CDM) entities from a Project Data Model (PDM) Scheduling Block Definition.

ska_oso_scripting.pdm_transforms.sdp.create_sdpconfiguration_centralnode(subarray_id: int, sbd: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.central_node.sdp.SDPConfiguration[source]

Create a SDPConfiguration.

Parameters:
  • subarray_id – the subarray id to target

  • pdm_config – the SBDefinition to use in creation

Raises:

TypeError – if pdm_config is not an SBDefinition

ska_oso_scripting.pdm_transforms.sdp.create_sdpconfiguration_subarraynode(scan_definition: ska_oso_pdm.sb_definition.ScanDefinition, target: ska_oso_pdm.sb_definition.Target) ska_tmc_cdm.messages.subarray_node.configure.sdp.SDPConfiguration[source]

Convert a PDM Scan Definition to an SDP Configuration aspect of a TMC SubArrayNode.Configure call if no PDM SDPConfiguration is present

The pdm_transforms module contains code to transform Project Data Model (PDM) entities to Configuration Data Model (CDM) entities. The pdm_transforms code is called by observing scripts to convert the PDM Scheduling Block to the equivalent CDM configurations, which are then sent to TMC devices to control the telescope.

ska_oso_scripting.pdm_transforms.wrapper.create_cdm_configure_requests_from_scheduling_block(sbd: ska_oso_pdm.SBDefinition, runtime_args: dict[str, Any] | None = None) dict[int, list[ska_tmc_cdm.messages.subarray_node.configure.ConfigureRequest]][source]

Top level function to create CDM ConfigureRequests for each scan in the SBDefinition, returning a dictionary that is keyed by the scan sequence index (note - this is 0 indexed).

The dict value is a list of ConfigureRequests because for a single scan there may be partial ConfigureRequests that need to be sent after the initial one.

ska_oso_scripting.pdm_transforms.wrapper.create_cdm_assign_resources_request_from_scheduling_block(subarray_id: int, sbd: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.central_node.assign_resources.AssignResourcesRequest[source]

Top level function to create an AssignResources command from a Scheduling Block Definition