hif_checkproductsize¶
- hif_checkproductsize(vis=None, maxcubesize=None, maxcubelimit=None, maxproductsize=None, maximsize=None, calcsb=None, parallel=None) Results[source]¶
Mitigate imaging product sizes to fit within specified thresholds.
Checks the predicted sizes of all imaging products and applies a mitigation cascade to keep them within the allowed limits. Default thresholds are
maxcubesize=40 GB,maxcubelimit=60 GB, andmaxproductsize=500 GB. Size estimates use 4 bytes/pixel; both the intensity image and primary beam image are counted.The mitigation cascade (applied in order until sizes fall below the thresholds) is:
Step 1 (per spw exceeding maxcubesize):
Channel binning: set
nbin=2if nchan == 3840 or in (1920, 960, 480) without prior online averaging.Primary beam level reduction: compute
PB_mitigation = exp(ln(0.2) * maxcubesize / cubesize)(with padding correction and clamped to PB=0.7). Only for single-field targets; same mitigated FoV applies to all products.Cell size reduction: change pixels-per-beam from 5 to 3.25 (
robust=+2) or 3.0 (otherwise).If still too large: stop with error.
Step 2 (if productsize > maxproductsize):
Reduce the number of science targets until productsize < maxproductsize (representative target is always retained).
If still too large, repeat Step 1 mitigations.
If still too large: stop with error.
Step 3: If any cube > 0.5 x maxcubelimit, limit the number of large cubes cleaned to 1 (the spw containing the representative frequency is always retained).
Step 4: Limit the number of science targets to image to 30 (representative target always retained).
The
casa_commands.logfile contains thetcleancommands that can be re-run without mitigation. Thecasa_pipescript.pyfile explicitly encodes the threshold values so they can be modified on a per-MOUS basis.- Parameters:
vis --
The list of input MeasurementSets. Defaults to the list of MeasurementSets specified in hifa_importdata and hifv_importdata.
Examples:
'ngc5921.ms',['ngc5921a.ms', ngc5921b.ms', 'ngc5921c.ms']maxcubesize --
Maximum allowed cube size in gigabytes (mitigation goal)
Default:
-1- automatic from performance parametersmaxcubelimit --
Maximum allowed cube limit in gigabytes (mitigation failure limit)
Default:
-1- automatic from performance parametersmaxproductsize --
Maximum allowed product size in gigabytes (mitigation goal and failure limit)
Default:
-1- automatic from performance parametersmaximsize --
Maximum allowed image count size (mitigation goal and hard maximum). Parameter
maximsizemust be even and divisible by2, 3, 5, 7only. *Caution*maximsizeis disabled by default and cannot be set at the same time asmaxcubesize,maxcubelimitandmaxproductsize.Default:
-1- disables mitigation for this parametercalcsb -- Force (re-)calculation of sensitivities and beams
parallel --
Use the CASA imager parallelization when possible.
Options:
'automatic','true','false',True,FalseDefault:
'automatic'
Notes
QA = 1.0 if no mitigation was necessary; 0.85 (blue) if mitigation was applied; 0.0 if mitigation was attempted but failed (error message appears at the top of the WebLog page).
- Returns:
The results object for the pipeline task is returned.
Examples
Check product sizes with internal defaults:
>>> hif_checkproductsize()
Standard ALMA call with explicit thresholds:
>>> hif_checkproductsize(maxcubesize=40.0, maxcubelimit=60.0, maxproductsize=350.0)