hifa_gfluxscaleflag¶
- hifa_gfluxscaleflag(vis=None, intent=None, phaseupsolint=None, solint=None, minsnr=None, refant=None, antnegsig=None, antpossig=None, tmantint=None, tmint=None, tmbl=None, antblnegsig=None, antblpossig=None, relaxed_factor=None, niter=None, parallel=None) ResultsList[Results][source]¶
Flag outlier visibilities in the flux, diffgain, and phase calibrators and check source.
Performs a temporary calibration using the spw mapping/combine parameters established in hifa_spwphaseup (with
solintalways 'int' andgaintypealways 'G' for the phase-up, andsolint='inf'andgaintype='T'for the amplitude solutions), then identifies and flags outlier visibilities by statistically examining the scalar difference of calibrated amplitudes minus model amplitudes. Only amplitude outliers are flagged; the phase of the data is not assessed.The heuristics differ slightly between multi-scan calibrators (typically the phase calibrator and sometimes the check source) and single-scan calibrators.
The workflow is:
Snapshot the current flagging state.
Solve and apply preliminary phase and amplitude calibration.
Run flagging heuristics; identify outlier visibilities.
Restore the flagging state from the snapshot.
Apply any newly identified flags.
The WebLog shows amplitude vs. uv-distance and amplitude vs. time plots before flagging and (if any flags were found) after flagging.
- Parameters:
vis --
The list of input MeasurementSets. Defaults to the list of MeasurementSets specified in the pipeline context.
Example:
vis=['M51.ms']intent --
A string containing a comma delimited list of intents against which the selected fields are matched. If undefined (default), it will select all data with the AMPLITUDE, PHASE, and CHECK intents, except for one case: if one of the AMPLITUDE intent fields was also used for BANDPASS, then this task will select only data with PHASE and CHECK intents.
Example:
intent='*PHASE*'phaseupsolint --
The phase correction solution interval in CASA syntax.
Example:
phaseupsolint='300s'solint --
Time and channel solution intervals in CASA syntax.
Example:
solint='inf,10ch',solint='inf'minsnr -- Solutions below this SNR are rejected.
refant --
Reference antenna names. Defaults to the value(s) stored in the pipeline context. If undefined in the pipeline context defaults to the CASA reference antenna naming scheme.
Example:
refant='DV01',refant='DV06,DV07'antnegsig --
Lower sigma threshold for identifying outliers as a result of bad antennas within individual timestamps.
Example:
antnegsig=4.0antpossig --
Upper sigma threshold for identifying outliers as a result of bad antennas within individual timestamps.
Example:
antpossig=4.6tmantint --
Threshold for maximum fraction of timestamps that are allowed to contain outliers.
Example:
tmantint=0.063tmint --
Threshold for maximum fraction of "outlier timestamps" over "total timestamps" that a baseline may be a part of.
Example:
tmint=0.085tmbl --
Initial threshold for maximum fraction of "bad baselines" over "all baselines" that an antenna may be a part of.
Example:
tmbl=0.175antblnegsig --
Lower sigma threshold for identifying outliers as a result of "bad baselines" and/or "bad antennas" within baselines, across all timestamps.
Example:
antblnegsig=3.4antblpossig --
Threshold for identifying outliers as a result of "bad baselines" and/or "bad antennas" within baselines, across all timestamps.
Example:
antblpossig=3.2relaxed_factor --
Relaxed value to set the threshold scaling factor to under certain conditions (see task description).
Example:
relaxed_factor=2.0niter --
Maximum number of times to iterate on evaluation of flagging heuristics. If an iteration results in no new flags, then subsequent iterations are skipped.
Example:
niter=2parallel --
Process multiple MeasurementSets in parallel using the casampi parallelization framework.
Options:
'automatic','true','false',True,FalseDefault:
None(equivalent toFalse)
Notes
For each intent, the QA sub-score = 1 - (fraction of data newly flagged). The final stage QA score is the product of all per-intent sub-scores. For example, if AMPLITUDE has 10% newly flagged and PHASE has 40% newly flagged, the total score is (1 - 0.1) x (1 - 0.4) = 0.54.
- Returns:
The results object for the pipeline task is returned.
Examples
1. Run with recommended settings to create flux scale calibration with flagging using recommended thresholds:
>>> hifa_gfluxscaleflag()