ska_sdp_e2e_batch_continuum_imaging.pipelines.utilities.sdp_utils module

ska_sdp_e2e_batch_continuum_imaging.pipelines.utilities.sdp_utils.prepare_sdm(config)[source]

Create a path for the SDM to be used in the pipeline.

Parameters:

config (SDPBatchE2EPipelineConfig) -- The SDP configuration containing the upstream SDM path and the processing script name.

Returns:

The path where the SDM should be located for the pipeline.

Return type:

Path

ska_sdp_e2e_batch_continuum_imaging.pipelines.utilities.sdp_utils.sdp_to_e2e_pipeline_config(config)[source]

Convert an SDP configuration to an E2E pipeline configuration. It iterate through the visibility subpaths in the SDP config to find measurement sets, categorises them into calibrator sources and target sources on the basis of scan intent, and generates the corresponding E2E pipeline configuration.

Parameters:

config (SDPBatchE2EPipelineConfig) -- The SDP configuration to convert.

Returns:

The converted E2E pipeline configuration.

Return type:

dict

ska_sdp_e2e_batch_continuum_imaging.pipelines.utilities.sdp_utils.sort_ms_files(ms_files)[source]

Sort a list of MeasurementSet paths by their start time.

Parameters:

mses (list of Path) -- A list of paths pointing to MeasurementSet directories.

Returns:

The input paths sorted in ascending order based on the earliest time entry found in each MeasurementSet.

Return type:

list of Path

ska_sdp_e2e_batch_continuum_imaging.pipelines.utilities.sdp_utils.sort_source_scans(sources)[source]

Sort the measurement sets within each source in a list.

Parameters:

sources (list[Source]) -- A collection of source objects, where each object contains a list of measurement sets and a field id.

Returns:

A new list of source objects with their measurement sets sorted.

Return type:

list[Source]