hif_applycal

hif_applycal(vis=None, field=None, intent=None, spw=None, antenna=None, parang=None, applymode=None, calwt=None, flagbackup=None, flagsum=None, flagdetailedsum=None, parallel=None) ResultsList[Results][source]

Apply precomputed calibration tables to the visibility data.

Applies all calibration tables stored in the pipeline context to the visibility data using predetermined field/spw maps and default interpolation parameters. Failed calibration solutions and flagged Tsys scans propagate as additional flags in the science data at this stage.

The WebLog shows a summary of the additional flagging applied at this stage, and many plots of the calibrated data as a function of time and frequency. To reduce processing time, target plots include only the representative target (and for mosaics, only the brightest field).

An additional per-antenna QA score is computed from the calibrated Amplitude vs. Frequency and Phase vs. Frequency plots for each calibrator. For each antenna a linear function is fitted to the data per scan per polarisation, and the slope/offset is compared to the equivalent fit for all antennas. As of PL2025 outliers must exceed set thresholds (10% or 10% per 2 GHz for amplitude offset/slope, or 6 deg or 6 deg per 2 GHz for phase offset/slope) to generate a QA message. Details of deviant antennas are reported in the expandable QA messages at the top of the page and in an applycalQA_outliers.txt file. Note that amplitude-frequency offsets symmetric in XX/YY and phase-frequency offsets for CHECK sources are excluded from the outlier QA.

A uv-coverage plot (before and after calibration flags) is provided for the representative source and spw.

Parameters:
  • vis --

    The list of input MeasurementSets. Defaults to the list of MeasurementSets in the pipeline context.

    Example: ['X227.ms']

  • field --

    A string containing the list of field names or field ids to which the calibration will be applied. Defaults to all fields in the pipeline context.

    Examples: '3C279', '3C279, M82'

  • intent --

    A string containing the list of intents against which the selected fields will be matched. Defaults to all supported intents in the pipeline context.

    Example: '*TARGET*'

  • spw --

    The list of spectral windows and channels to which the calibration will be applied. Defaults to all science windows in the pipeline context.

    Examples: '17', '11, 15'

  • antenna -- The selection of antennas to which the calibration will be applied. Defaults to all antennas. Not currently supported.

  • parang -- Apply parallactic angle correction

  • applymode --

    Calibration apply mode. Options:

    • 'calflag': calibrate data and apply flags from solutions

    • 'calflagstrict': (default) same as above except flag spws for which calibration is unavailable in one or more tables (instead of allowing them to pass uncalibrated and unflagged)

    • 'trial': report on flags from solutions, dataset entirely unchanged

    • 'flagonly': apply flags from solutions only, data not calibrated

    • 'flagonlystrict': same as above except flag spws for which calibration is unavailable in one or more tables

    • 'calonly': calibrate data only, flags from solutions not applied

  • calwt -- Calibrate the weights as well as the data

  • flagbackup -- Backup the flags before the apply

  • flagsum -- Compute before and after flagging summary statistics

  • flagdetailedsum -- Compute detailed before and after flagging statistics summaries. Parameter available only when if flagsum is True.

  • parallel --

    Process multiple MeasurementSets in parallel using the casampi parallelization framework.

    Options: 'automatic', 'true', 'false', True, False

    Default: None (equivalent to False)

Notes

Flagging QA: 0.0 if the additional flag fraction on the science target >= 50%; 1.0 if <= 5%; linearly interpolated between 0 and 1 for fractions between 5% and 50%.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Apply the calibration to the target data:

>>> hif_applycal(intent='TARGET')