ska_sdp_instrumental_calibration.data_managers.sdm module

SDM class to manage science data model

ska_sdp_instrumental_calibration.data_managers.sdm.get_gaintable_file_path(output_dir, filename, sdm_path, purpose, field_id)[source]

Generate the file path for a gain table.

Parameters:
  • output_dir (str or Path) -- Fallback directory if no SDM path is provided.

  • filename (str) -- Base name of the gain table file.

  • sdm_path (str or Path, optional) -- Path to the Science Data Model directory.

  • purpose (str) -- The calibration purpose of the gain table.

  • field_id (str or int) -- Identifier for the observed field.

Returns:

The resolved destination path for the gain table file.

Return type:

Path

ska_sdp_instrumental_calibration.data_managers.sdm.prepare_qa_path(output_dir, sdm_path, **kwargs)[source]

Initialize SDM directory structure and prepare the QA path.

Parameters:
  • output_dir (str) -- Base directory used to construct the SDM path if not provided.

  • sdm_path (str or None) -- Path to the SDM directory. If None, it defaults to a 'sdm' subdirectory within output_dir.

  • **kwargs (dict) -- Additional keyword arguments for path preparation.

Returns:

The path to the prepared log directory.

Return type:

str