hif_makeimages

hif_makeimages(vis=None, target_list=None, hm_masking=None, hm_sidelobethreshold=None, hm_noisethreshold=None, hm_lownoisethreshold=None, hm_negativethreshold=None, hm_minbeamfrac=None, hm_growiterations=None, hm_dogrowprune=None, hm_minpercentchange=None, hm_fastnoise=None, hm_nsigma=None, hm_perchanweightdensity=None, hm_npixels=None, hm_cyclefactor=None, hm_nmajor=None, hm_minpsffraction=None, hm_maxpsffraction=None, hm_weighting=None, hm_cleaning=None, tlimit=None, drcorrect=None, masklimit=None, cleancontranges=None, calcsb=None, hm_mosweight=None, overwrite_on_export=None, vlass_plane_reject_im=None, parallel=None) Results[source]

Create cleaned images from the target list populated by hif_makeimlist.

Images are deconvolved using tclean with the auto-multithresh auto-masking algorithm (Kepley et al. 2020). Two thresholds, sidelobethreshold and noisethreshold, control the masking at each minor cycle. For continuum imaging, if auto-masking prunes all regions, a fallback mask at the 0.3 primary beam response level is used. Cube imaging stages do not apply this fallback.

Images are cleaned to 2 x (predicted rms noise) x (dynamic range correction factor), where the DR factor accounts for imaging artifacts at high dynamic range. For 12-m array calibrators the factor is 1 (DR <= 1000), DR/1000 (1000-3000), or DR/3000 (>= 3000). For 7-m array (1 EB) it is 1 (DR <= 200) or DR/200 (>= 200). For 12-m array science targets the factor ranges from 1 (DR <= 20) up to max(2.5, DR/150) (DR >= 150). The dynamic range correction factor is shown next to each image in the WebLog.

The auto-multithresh parameters depend on array and configuration:

Parameter          7m     12m b75<300m  12m b75=300-400m  12m b75>400m
noisethreshold    5.0       4.25           5.0              5.0
sidelobethreshold 1.25      2.0            2.0              2.5
lownoisethreshold 2.0       1.5            1.5              1.5
minbeamfrac       0.1       0.3            0.3              0.3
fastnoise         False     False          False            True

For cube imaging, an additional QA score assesses line contamination in line-free channels by computing mom8_fc (max along freq axis) and mom10_fc (min) images of the line-free channel ranges. Three metrics are evaluated: PeakSNR, HistAsym, and MaxSeg. If PeakSNR > 5 and HistAsym > 0.2, or PeakSNR > 3.5 and HistAsym > 0.05 and MaxSeg > 1 beam area, the QA score is in the range 0.33-0.65 (yellow); otherwise 0.67-1.0.

For check sources, additional Gaussian-fit-based QA is computed: positional offset from the catalog, peak/total flux ratio, and fitted/gfluxscale flux ratio. The final check source QA score is the geometric mean of the three sub-scores.

Check source QA table

Example of the check source QA table in the WebLog.

Cube imaging WebLog

Example of the cube imaging 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']

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

  • hm_masking -- Clean masking mode. Options are 'centralregion', 'auto', 'manual' and 'none'

  • hm_sidelobethreshold -- sidelobethreshold * the max sidelobe level

  • hm_noisethreshold -- noisethreshold * rms in residual image

  • hm_lownoisethreshold -- lownoisethreshold * rms in residual image

  • hm_negativethreshold -- negativethreshold * rms in residual image

  • hm_minbeamfrac -- Minimum beam fraction for pruning

  • hm_growiterations -- Number of binary dilation iterations for growing the mask

  • hm_dogrowprune -- Do pruning on the grow mask. Defaults to '' to enable the automatic heuristics calculation. Can be set to True or False manually.

  • hm_minpercentchange -- Mask size change threshold

  • hm_fastnoise -- Faster noise calculation for automask or nsigma stopping. Defaults to '' to enable the automatic heuristics calculation. Can be set to True or False manually.

  • hm_nsigma -- Multiplicative factor for rms-based threshold stopping

  • 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_npixels -- Number of pixels to determine uv-cell size for super-uniform weighting

  • hm_cyclefactor -- Scaling on PSF sidelobe level to compute the minor-cycle stopping threshold

  • hm_nmajor -- Controls the maximum number of major cycles to evaluate.

  • hm_minpsffraction -- PSF fraction that marks the max depth of cleaning in the minor cycle

  • hm_maxpsffraction -- PSF fraction that marks the minimum depth of cleaning in the minor cycle

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

  • hm_cleaning -- Pipeline cleaning mode

  • tlimit -- Times the sensitivity limit for cleaning

  • drcorrect -- Override the default heuristics-based DR correction (for ALMA data only)

  • masklimit -- Times good mask pixels for cleaning

  • cleancontranges -- Clean continuum frequency ranges in cubes

  • calcsb -- Force (re-)calculation of sensitivities and beams

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

  • overwrite_on_export -- Replace existing image products when h/hifa/hifv_exportdata is called. If False, images that would have the same FITS name on export, are amended to include a version number. For example, if oussid.J1248-4559_ph.spw21.mfs.I.pbcor.fits would already be exported by a previous call to hif_makeimags, then 'oussid.J1248-4559_ph.spw21.mfs.I.pbcor.v2.fits' would also be exported to the products/ directory. The first exported product retains the same name. Additional products start counting with 'v2', 'v3', etc.

  • vlass_plane_reject_im --

    Only used for the 'VLASS-SE-CUBE' imaging mode.

    Default: True

    If True, reject VLASS Coarse Cube planes with high flagging percentages or outlier beam sizes (see the heuristics details below)

    If False, do not perform the post-imaging VLASS Coarse Cube plane rejection. If the input value is a dictionary, the plane rejection heuristics will be performed with custom thresholds. The optional keys could be:

    • exclude_spw, default: '' Spectral windows to be excluded from the VLASS Coarse Cube post-imaging plane rejection consideration, i.e. always preserve.

    • flagpct_thresh, default: 0.8 The flagging percentage across the entire mosaic to be considered to be high flagging level for the plane rejection.

    • beamdev_thresh: default: 0.2 Threshold for the fractional beam deviation from the expected value required for the plane rejection.

  • parallel --

    Use CASA/tclean built-in parallel imaging for individual scientific targets, or, perform continuum imaging of multiple target (calibrators) concurrently without the CASA/tclean built-in parallelization.

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

    Default: 'automatic' - optimizes the parallelization mode based on the imaging target type

    (scientific targets vs. calibrators) and the specific operation.

Notes

Three base QA scores apply to all imaging stages:

  • QA = 0.0 if the clean algorithm diverges.

  • QA = 0.34 if an expected image is not created.

  • Third score = ratio of non-pbcor noise-annulus rms (0.3-0.2 PB level) to the product of the theoretical noise and the DR correction factor. QA = 1.0 if that ratio <= 1.0; QA = 0.0 if >= 5.0; linearly scaled between 1 and 5.

Returns:

The results object for the pipeline task is returned.

Examples

  1. Compute clean results for all imaging targets defined in a previous hif_makeimlist call:

>>> hif_makeimages()
  1. Compute clean results overriding automatic masking choice:

>>> hif_makeimages(hm_masking='centralregion')