hif_lowgainflag¶
- hif_lowgainflag(vis=None, intent=None, spw=None, refant=None, flag_nmedian=None, fnm_lo_limit=None, fnm_hi_limit=None, tmef1_limit=None) ResultsList[Results][source]¶
Flag antennas with persistently discrepant amplitude gains.
Detects antennas with outlier amplitude gains calculated from the bandpass calibrator observation. The WebLog links to greyscale images of the relative gain per antenna and indicates which antennas, if any, were flagged.
The task performs the following steps:
Performs an initial phase-up for the BANDPASS intent.
Creates a bandpass calibration table.
Creates a gain phase calibration table.
Creates a gain amplitude calibration table.
Uses the gain amplitude table to identify antennas with outlier gains per spw.
Applies flagging commands for the identified outlier antennas to the entire MS.
A separate time x antenna matrix view is created per spw. Each point is the absolute gain amplitude for that antenna/timestamp. Antennas are flagged if their gain is:
Below
fnm_lo_limit(default: 0.5) times the median of all non-flagged data points, orAbove
fnm_hi_limit(default: 1.5) times the median of all non-flagged data points.
If any antennas are significantly flagged, the reference antenna ranked list is reordered with the flagged antennas moved to the end; an 'Attention' notification appears at the top of the WebLog page.
- Parameters:
vis --
The list of input MeasurementSets. Defaults to the list of MeasurementSets specified in the <hifa,hifv>_importdata task. '': use all MeasurementSets in the context
Examples: 'ngc5921.ms', ['ngc5921a.ms', ngc5921b.ms', 'ngc5921c.ms']
intent -- A string containing the list of intents to be checked for antennas with deviant gains. The default is blank, which causes the task to select the 'BANDPASS' intent.
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: spw='17', spw='11, 15'
refant --
A string containing a prioritized list of reference antenna name(s) to be used to produce the gain table. Defaults to the value(s) stored in the pipeline context. If undefined in the pipeline context defaults to the CASA reference antenna naming scheme.
Examples: refant='DV01', refant='DV06,DV07'
flag_nmedian -- Whether to flag figures of merit greater than
fnm_hi_limit* median or lower thanfnm_lo_limit* median. (default: True)fnm_lo_limit -- Flag values lower than
fnm_lo_limit* median (default: 0.5)fnm_hi_limit -- Flag values higher than
fnm_hi_limit* median (default: 1.5)tmef1_limit -- Threshold for "too many entirely flagged" - the critical fraction of antennas whose solutions are entirely flagged in the flagging view of a spw for this stage: if the fraction is equal or greater than this value, then flag the visibility data from all antennas in this spw (default: 0.666)
Notes
QA = 0.0 if additional flagging fraction >= 50%, QA = 1.0 if <= 5%, linearly interpolated between 0 and 1 for fractions between 5% and 50%. An additional score of 0.8 is assigned if any spw has an antenna that is fully flagged.
- Returns:
The results object for the pipeline task is returned.
Examples
Flag antennas with low or high gain using recommended thresholds:
>>> hif_lowgainflag()