ska_oso_scripting.functions.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.functions.pdm_transforms.csp.convert_cspconfiguration(telescope: ska_oso_pdm.TelescopeType, pdm_config: ska_oso_pdm.sb_definition.csp.CSPConfiguration, pdm_mccs_allocation: ska_oso_pdm.sb_definition.MCCSAllocation | None = None, target: ska_oso_pdm.sb_definition.Target | None = None) ska_tmc_cdm.messages.subarray_node.configure.csp.CSPConfiguration [source]
Converts the relevant parts of the SBDefinition into a CDM CSPConfiguration.
- Parameters:
telescope – telescope type, either SKA_MID or SKA_LOW
pdm_config – The PDM CSPConfiguration to convert
pdm_mccs_allocation – The PDM MCCSAllocation that is also required for the conversion
target – The PDM target that is used for tied array observations (support for LOW only)
- Returns:
the equivalent CDM configuration
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.functions.pdm_transforms.mccs.create_mccs_allocation(sb_definition: 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.functions.pdm_transforms.mccs.convert_mccs_configuration(allocation: ska_oso_pdm.sb_definition.MCCSAllocation, lowcbf: ska_oso_pdm.sb_definition.csp.LowCBFConfiguration | None, target: ska_oso_pdm.sb_definition.Target) ska_tmc_cdm.messages.subarray_node.configure.mccs.MCCSConfiguration [source]
Convert PDM Low SB TargetBeamConfiguration list to a CDM MCCSConfiguration.
Other SB elements required are the Target list and SubarrayBeamConfiguration list, which are referenced by the TargetBeamConfigurations.
The MCCSAllocation is also needed for its list of station_ids.
- Parameters:
allocation – The PDM MCCSAllocation
lowcbf – The low cfg configuration
target – The PDM Target list
- Returns:
the required CDM MCCSConfiguration
- ska_oso_scripting.functions.pdm_transforms.mccs.get_subarray_beam_ids(allocation: ska_oso_pdm.sb_definition.MCCSAllocation) list[int] [source]
Get the subarray beam ids array from the MCC Allocation
- ska_oso_scripting.functions.pdm_transforms.mccs.get_station_ids(allocation: ska_oso_pdm.sb_definition.MCCSAllocation) list[list[int]] [source]
Get the station ids from the MCC Allocation
- ska_oso_scripting.functions.pdm_transforms.mccs.get_allocation_apertures(subarray_beam: ska_tmc_cdm.messages.central_node.mccs.SubArrayBeamsConfiguration) 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.functions.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 target is an instance of HorizontalCoordinates or ICRSCoordinates, set reference_frame to “topocentric” and pass c1=az, c2=el target is an instance of EquatorialCoordinates or AltAzCoordinates, set reference_frame to “ICRS” and pass c1=ra, c2=dec
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.functions.pdm_transforms.dish.convert_pointingconfiguration(target: ska_oso_pdm.sb_definition.Target, correction: ska_oso_pdm.sb_definition.PointingCorrection) ska_tmc_cdm.messages.subarray_node.configure.PointingConfiguration [source]
Convert a PDM Target to the equivalent TMC configuration
- ska_oso_scripting.functions.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.functions.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.functions.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 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.functions.pdm_transforms.wrapper.create_cdm_configure_request_from_scheduling_block(scheduling_block: ska_oso_pdm.SBDefinition) dict[str, list[ska_tmc_cdm.messages.subarray_node.configure.ConfigureRequest]] [source]
creates a dictionary mapping PDM scan definition ids to a list of CDM ConfigureRequest objects
- ska_oso_scripting.functions.pdm_transforms.wrapper.create_cdm_assign_resources_request_from_scheduling_block(subarray_id: int, scheduling_block: ska_oso_pdm.SBDefinition) ska_tmc_cdm.messages.central_node.assign_resources.AssignResourcesRequest [source]
creates a list of CDM AssignResourcesRequest object from a Scheduling Block