hif_findcont

hif_findcont(vis=None, target_list=None, hm_mosweight=None, hm_perchanweightdensity=None, hm_weighting=None, datacolumn=None, parallel=None) Results[source]

Identify line-free continuum frequency ranges for each science target and spw.

Creates dirty image cubes at native channel resolution (using robust=1 for optimal line sensitivity) for each science target and spw. The pipeline then runs the findContinuum function to identify channel ranges likely free of line emission via the following steps:

  1. Joint-mask mean spectrum: SNR-based thresholds on the moment-0 (integrated) and moment-8 (peak) images define a 2-D joint mask. The mask is pruned to remove islands smaller than max(4, int(beamAreaInPixels * minbeamfrac)) pixels (minbeamfrac=0.3; 0.5 for ACA 7m if all islands are pruned). The mean spectrum over the mask is computed and analyzed to find line-free channels.

  2. Pre-smoothing: A boxcar smoothing kernel is applied to the mean spectrum prior to analysis. For Cycle 10+ data the kernel width is derived from the spectralDynamicRangeBandwidth ASDM attribute. For older data it is based on the nbin factor from the preceding hif_makeimlist stage, with additional heuristics to skip smoothing for wide + narrow spw combinations, already-labeled continuum spws, and cases of strong line emission (peak SNR > 10: nbin limited to 2 for 12m, 3 for 7m).

  3. Moment-difference contamination check: Line-free channels are used to form mom8fc and mom0fc images; the scaled-subtracted momDiff image peak SNR is computed. If momDiffSNR > 8 (or > 11.5 for high-atm-variation spws), contamination is likely. Two remediation paths are tried: Amend Mask (logic code starts with A) or Only Extra Mask (code starts with E). Further steps include channel intersection, extra-mask, and autoLower (X, Y) iterations. The final logic path code and momDiffSNR are shown in the plot legend and the WebLog table.

  4. AllContinuum check: If a single range covers >= 92.5% of the channels (>= 91% for spws with < 75 channels), the spw is declared AllContinuum and no cube is subsequently cleaned.

If a cont.dat file already exists in the working directory, spws with pre-defined ranges are not re-analyzed; only spws not listed are processed. The resulting cont.dat file (LSRK frequency ranges) is used by subsequent hif_uvcontsub and hif_makeimages stages.

Example findContinuum plots

Two examples: entire spectral window identified as continuum (left) and two continuum ranges identified (right). Cyan horizontal lines mark the identified frequency ranges.

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']

  • target_list -- Dictionary specifying targets to be imaged; blank will read list from context.

  • hm_mosweight -- Mosaic weighting. Defaults to '' to enable the automatic heuristics calculation. Can be set to True or False manually.

  • hm_perchanweightdensity -- Calculate the weight density for each channel independently. Defaults to '' to enable the automatic heuristics calculation. Can be set to True or False manually.

  • hm_weighting -- Weighting scheme (natural,uniform,briggs,briggsabs[experimental],briggsbwtaper[experimental])

  • datacolumn -- Data column to image. Only to be used for manual overriding when the automatic choice by data type is not appropriate.

  • parallel --

    Use CASA/tclean built-in parallel imaging when possible.

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

    Default: 'automatic'

Notes

QA = 1.0 if continuum frequency ranges were found for all spws; otherwise QA = fraction of spws for which a range was identified. QA = 0.0 if size mitigation previously failed.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Identify continuum frequency ranges for all science targets and spws:

>>> hif_findcont()