flint.prefect.flows.bandpass_pipeline

Pipeline to calibrate a ASKAP style bandpass observation.

At the moment this is expected to be performed against observations taken towards PKS1934-638. At the time of writing a typical ASKAP bandpass observation will cycle each beam so that it is centred on this source. This means that practically there are 36 separate fields at slightly different field centres. The bandpass calibration process will first have to split the correct field out before actually calibration.

Attributes

Functions

calibrate_bandpass_flow(→ pathlib.Path)

Create and run the prefect flow to calibrate a set of bandpass measurement sets.

cli(→ None)

get_parser(→ argparse.ArgumentParser)

Create an argument parser for the bandpass prefect workflow

run_bandpass_stage(...)

Executes the bandpass calibration (using calibrate) against a set of

setup_run_bandpass_flow(→ pathlib.Path)

Create and run the prefect flow to calibrate a set of bandpass measurement sets.

task_bandpass_create_apply_solutions_cmd(...)

Apply an ao-calibrate style solutions file to an input measurement set.

task_flag_solutions(...)

Flag calibration solutions

Module Contents

flint.prefect.flows.bandpass_pipeline.calibrate_bandpass_flow(bandpass_path: pathlib.Path, split_path: pathlib.Path, bandpass_options: flint.options.BandpassOptions) pathlib.Path[source]

Create and run the prefect flow to calibrate a set of bandpass measurement sets.

The measurement sets that will be calibreated are expected to: - be following the raw name format convention - reside in a directory whose name is the SBID of the observation

The current bandpass procedure currently relies on the Andre Offringa’s calibrate tool, with slight modification from Emil Lenc. The well known source PKS1934-638 is the only source supported for bandpass calibration, and its model is packaged inside flint. This model is in the AO-style format.

Each measurement set will correspond to a solutions file once the calibrate tool has been executed successfully. These should be kept together – there is not enough meta-data in the single solutions file to denote the frequency / channels / beam number described in the measurement set.

Parameters:
  • bandpass_path (Path) – Location to the folder containing the raw ASKAP bandpass measurement sets that will be calibrated

  • split_path (Path) – Location that will contain a folder, named after the SBID of the observation, that will contain the output bandpass measurement sets, solutions and plots

  • bandpass_options (BandpassOptions) – Options that specify configurables of the bandpass processing.

Returns:

Directory that contains the extracted measurement sets and the ao-style gain solutions files.

Return type:

Path

flint.prefect.flows.bandpass_pipeline.cli() None[source]
flint.prefect.flows.bandpass_pipeline.get_parser() argparse.ArgumentParser[source]

Create an argument parser for the bandpass prefect workflow

Returns:

CLI argument parser

Return type:

ArgumentParser

flint.prefect.flows.bandpass_pipeline.run_bandpass_stage(bandpass_mss: Collection[flint.options.MS], output_split_bandpass_path: pathlib.Path, bandpass_options: flint.options.BandpassOptions, model_path: pathlib.Path, source_name_prefix: str = 'B1934-638', skip_rotation: bool = False) list[flint.calibrate.aocalibrate.CalibrateCommand][source]

Executes the bandpass calibration (using calibrate) against a set of input measurement sets.

Parameters:
  • bandpass_mss (Collection[MS]) – Set of bandpass measurement sets to calibrate

  • output_split_bandpass_path (Path) – The location where the extract field centred on the calibration field (typically PKSB19340638)

  • bandpass_options (BandpassOptions) – Configurables that will specify the bandpass calibbration process

  • model_path (Path) – Path to the model used to calibrate against

  • source_name_prefix (str, optional) – Name of the field being calibrated. Defaults to “B1934-638”.

  • skip_rotation (bool, optional) – If True the rotation of the ASKAP visibility from the antenna frame to the sky-frame will be skipped. Defaults to False.

Returns:

Set of calibration commands used

Return type:

List[CalibrateCommand]

flint.prefect.flows.bandpass_pipeline.setup_run_bandpass_flow(bandpass_path: pathlib.Path, split_path: pathlib.Path, cluster_config: pathlib.Path, bandpass_options: flint.options.BandpassOptions) pathlib.Path[source]

Create and run the prefect flow to calibrate a set of bandpass measurement sets.

The measurement sets that will be calibreated are expected to: - be following the raw name format convention - reside in a directory whose name is the SBID of the observation

The current bandpass procedure currently relies on the Andre Offringa’s calibrate tool, with slight modification from Emil Lenc. The well known source PKS1934-638 is the only source supported for bandpass calibration, and its model is packaged inside flint. This model is in the AO-style format.

Each measurement set will correspond to a solutions file once the calibrate tool has been executed successfully. These should be kept together – there is not enough meta-data in the single solutions file to denote the frequency / channels / beam number described in the measurement set.

Parameters:
  • bandpass_path (Path) – Location to the folder containing the raw ASKAP bandpass measurement sets that will be calibrated

  • split_path (Path) – Location that will contain a folder, named after the SBID of the observation, that will contain the output bandpass measurement sets, solutions and plots

  • cluster_config (Path) – Path to a yaml file that is used to configure a prefect dask task runner.

  • bandpass_options (BandpassOptions) – Options that specify configurables of the bandpass processing.

Returns:

Directory that contains the extracted measurement sets and the ao-style gain solutions files.

Return type:

Path

flint.prefect.flows.bandpass_pipeline.task_bandpass_create_apply_solutions_cmd(ms: flint.options.MS, calibrate_cmd: flint.calibrate.aocalibrate.CalibrateCommand, container: pathlib.Path, output_column: str | None = None) flint.calibrate.aocalibrate.ApplySolutions[source]

Apply an ao-calibrate style solutions file to an input measurement set.

Internally the solutions path to apply to the nominaled measurement set is extracted from the incoming calibrate_cmd.

Parameters:
  • ms (MS) – The measurement set that will have solutions applied

  • calibrate_cmd (CalibrateCommand) – The calibrate command and meta-data describing the solutions to apply

  • container (Path) – Path to singularity container that will apply the solutions

  • output_column (Optional[Path], optional) – the output column name to create. Defaults to None.

Returns:

The apply solutions command and meta-data

Return type:

ApplySolutions

flint.prefect.flows.bandpass_pipeline.task_flag_solutions(calibrate_cmd: flint.calibrate.aocalibrate.CalibrateCommand, **kwargs) flint.calibrate.aocalibrate.CalibrateCommand[source]

Flag calibration solutions

Parameters:

calibrate_cmd (CalibrateCommand) – Calibrate command that contains path to the solution file that will be flagged

Returns:

Calibrate command with update meta-data describing the new solutions file

Return type:

CalibrateCommand

flint.prefect.flows.bandpass_pipeline.task_create_apply_solutions_cmd = None[source]
flint.prefect.flows.bandpass_pipeline.task_create_calibrate_cmd = None[source]
flint.prefect.flows.bandpass_pipeline.task_extract_correct_bandpass_pointing = None[source]
flint.prefect.flows.bandpass_pipeline.task_flag_ms_aoflagger = None[source]
flint.prefect.flows.bandpass_pipeline.task_preprocess_askap_ms = None[source]
flint.prefect.flows.bandpass_pipeline.task_select_solution_for_ms = None[source]
flint.prefect.flows.bandpass_pipeline.task_split_by_field = None[source]