hif_refant

hif_refant(vis=None, field=None, spw=None, intent=None, hm_refant=None, refant=None, geometry=None, flagging=None, parallel=None, refantignore=None) ResultsList[Results][source]

Select the best reference antennas.

The hif_refant task selects a list of reference antennas and stores them in the pipeline context in priority order. An ordered list of preferred reference antennas is calculated, with preference given to antennas closest to the center of the array and those with a low flagging fraction through the following metric M:

M = n_ant * ([1 - (normalized_distance_from_center)] + normalized_fraction_of_unflagged_data)

The center of the array is defined by the median values of the lists of antenna latitudes and longitudes. The WebLog page shows that ordered list of antennas, and the metric for each antenna can be found in the CASA log for this stage. A single refant can be selected manually in the PPR (but it will be applied to all EBs of the MOUS).

To avoid picking a reference antenna that is fully flagged on any particular calibrator intent (for example due to shadowing on a low-elevation calibrator), the following procedure is followed:

  1. The per-antenna flagging subscore is calculated for each calibrator intent independently.

  2. Intent-based flagging subscores are calculated by taking the minimum value across intents to establish the antenna flagging subscore.

  3. Antennas with a zero flagging subscore are removed entirely from the refant list.

The priority order is determined by a weighted combination of scores derived by the antenna selection heuristics. In manual mode the reference antennas can be set by hand.

Parameters:
  • vis --

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

    Example: ['M31.ms']

  • field --

    The comma delimited list of field names or field ids for which flagging scores are computed if hm_refant='automatic' and flagging = True

    Example: '' (Default to fields with the specified intents), '3C279', '3C279,M82'

  • spw --

    A string containing the comma delimited list of spectral window ids for which flagging scores are computed if hm_refant='automatic' and flagging = True.

    Example: '' (all spws observed with the specified intents), '11,13,15,17'

  • intent --

    A string containing a comma delimited list of intents against which the selected fields are matched. Defaults to all supported intents.

    Example: 'BANDPASS', 'AMPLITUDE,BANDPASS,PHASE,POLARIZATION'

  • hm_refant -- The heuristics method or mode for selection the reference antenna. The options are 'manual' and 'automatic. In manual mode a user supplied reference antenna refant is supplied. In 'automatic' mode the antennas are selected automatically.

  • refant --

    The user supplied reference antenna for hm_refant='manual'. If no antenna list is supplied an empty list is returned.

    Example: 'DV05'

  • geometry -- Score antenna by proximity to the center of the array. This option is quick as only the ANTENNA table must be read. Available when hm_refant is 'automatic'.

  • flagging -- Score antennas by percentage of unflagged data. This option requires computing flagging statistics. Available when hm_refant is 'automatic'.

  • parallel --

    Process multiple MeasurementSets in parallel using the casampi parallelization framework.

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

    Default: None (equivalent to False)

  • refantignore --

    string list to be ignored as reference antennas.

    Example: refantignore='ea02,ea03'

Notes

QA Scoring

The QA score is 1.0 if a suitable reference antenna is found, otherwise 0.0.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Compute the references antennas to be used for bandpass and gain calibration.

>>> hif_refant()