##################### generated by xml-casa (v2) from hif_editimlist.xml ############
##################### 3cebb911ef7f19e412fbae4c7d7cccdc ##############################
from __future__ import absolute_import
import numpy
from casatools.typecheck import CasaValidator as _val_ctor
_pc = _val_ctor( )
from casatools.coercetype import coerce as _coerce
from .private.task_hif_editimlist import hif_editimlist as _hif_editimlist_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _hif_editimlist:
"""
hif_editimlist ---- Add to a list of images to be produced with hif_makeimages()
Add to a list of images to be produced with hif_makeimages(), which uses hif_tclean() to invoke CASA tclean.
Many of the hif_editimlist() inputs map directly to tclean parameters.
If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
--------- parameter descriptions ---------------------------------------------
imagename Prefix for output image names.
search_radius_arcsec Size of the field finding beam search radius in arcsec.
cell Image X and Y cell size(s) with units or pixels per beam.
Single value same for both. \'<number>ppb\' for pixels per beam.
Compute cell size based on the UV coverage of all the fields
to be imaged and use a 5 pix per beam sampling.
The pix per beam specification uses the above default cell size
('5ppb') and scales it accordingly.
example: ['0.5arcsec', '0.5arcsec'] '3ppb'
cfcache Convolution function cache directory name
conjbeams Use conjugate frequency in tclean for wideband A-terms.
cyclefactor Controls the depth of clean in minor cycles based on PSF.
cycleniter Controls max number of minor cycle iterations in a single major cycle.
datacolumn Data column to image
deconvolver Minor cycle algorithm (multiscale or mtmfs)
editmode The edit mode of the task (e.g. add, edit). Defaults to 'add'.
field Set of data selection field names or ids.
imaging_mode Identity of product type (e.g. VLASS quick look) desired. This will determine the heuristics used.
imsize Image X and Y size(s) in pixels or PB level (single fields), \'\' for default. Single value same for both. \'<number>pb\' for PB level.
intent Set of data selection intents
gridder Name of the gridder to use with tclean
mask Used to declare whether to use a predefined mask for tclean.
nbin Channel binning factor.
nchan Number of channels, -1 = all
niter The max total number of minor cycle iterations allowed for tclean
nterms Number of Taylor coefficients in the spectral model
parameter_file keyword=value text file as alternative method of input parameters
pblimit PB gain level at which to cut off normalizations
phasecenter The default phase center is set to the mean of the field
directions of all fields that are to be image together.
example: 0, 'J2000 19h30m00 -40d00m00'
reffreq Reference frequency of the output image coordinate system
restfreq List of rest frequencies or a rest frequency in a string for output image.
robust Briggs robustness parameter for tclean
scales The scales for multi-scale imaging.
specmode Spectral gridding type (mfs, cont, cube, \'\' for default)
spw Set of data selection spectral window/channels, \'\' for all
start First channel for frequency mode images.
Starts at first input channel of the spw.
example: '22.3GHz'
stokes Stokes Planes to make
sensitivity
threshold Stopping threshold (number in units of Jy, or string)
nsigma Multiplicative factor for rms-based threshold stopping
uvtaper Used to set a uv-taper during clean.
uvrange Set of data selection uv ranges, \'\' for all.
width Channel width
pipelinemode The pipeline operating mode. In 'automatic' mode the pipeline
determines the values of all context defined pipeline inputs automatically.
In 'interactive' mode the user can set the pipeline context defined
parameters manually. In 'getinputs' mode the user can check the settings
of all pipeline parameters without running the task.
dryrun Run the task (False) or display the command(True)
acceptresults Add the results to the pipeline context
--------- examples -----------------------------------------------------------
"""
_info_group_ = """pipeline"""
_info_desc_ = """Add to a list of images to be produced with hif_makeimages()"""
def __call__( self, imagename='', search_radius_arcsec=float(1000.0), cell=[ ], cfcache='', conjbeams=False, cyclefactor=float(-999.0), cycleniter=int(-999), datacolumn='', deconvolver='', editmode='', field=[ ], imaging_mode='', imsize=numpy.array( [ ] ), intent='', gridder='', mask='', nbin=int(-1), nchan=int(-1), niter=int(0), nterms=int(0), parameter_file='', pblimit=float(-999.0), phasecenter='', reffreq='', restfreq='', robust=float(-999.0), scales=numpy.array( [ ] ), specmode='', spw='', start='', stokes='', sensitivity=float(0.0), threshold='', nsigma=float(-999.0), uvtaper='', uvrange='', width='', pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'imagename': {'type': 'cStr', 'coerce': _coerce.to_str}, 'search_radius_arcsec': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'cell': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'cfcache': {'type': 'cStr', 'coerce': _coerce.to_str}, 'conjbeams': {'type': 'cBool'}, 'cyclefactor': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'cycleniter': {'type': 'cInt'}, 'datacolumn': {'type': 'cStr', 'coerce': _coerce.to_str}, 'deconvolver': {'type': 'cStr', 'coerce': _coerce.to_str}, 'editmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'field': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'imaging_mode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'VLASS-QL', 'VLA', 'VLASS-SE-CUBE', 'VLASS-SE-CONT', 'ALMA', 'VLASS-SE-TAPER', '' ]}, 'imsize': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'gridder': {'type': 'cStr', 'coerce': _coerce.to_str}, 'mask': {'type': 'cStr', 'coerce': _coerce.to_str}, 'nbin': {'type': 'cInt'}, 'nchan': {'type': 'cInt'}, 'niter': {'type': 'cInt'}, 'nterms': {'type': 'cInt'}, 'parameter_file': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pblimit': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'phasecenter': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'reffreq': {'type': 'cStr', 'coerce': _coerce.to_str}, 'restfreq': {'type': 'cStr', 'coerce': _coerce.to_str}, 'robust': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'scales': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'specmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cInt'}]}, 'start': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'stokes': {'type': 'cStr', 'coerce': _coerce.to_str}, 'sensitivity': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'threshold': {'type': 'cStr', 'coerce': _coerce.to_str}, 'nsigma': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'uvtaper': {'type': 'cStr', 'coerce': _coerce.to_str}, 'uvrange': {'anyof': [{'type': 'cStr', 'coerce': _coerce.to_str}, {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}]}, 'width': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'imagename': imagename, 'search_radius_arcsec': search_radius_arcsec, 'cell': cell, 'cfcache': cfcache, 'conjbeams': conjbeams, 'cyclefactor': cyclefactor, 'cycleniter': cycleniter, 'datacolumn': datacolumn, 'deconvolver': deconvolver, 'editmode': editmode, 'field': field, 'imaging_mode': imaging_mode, 'imsize': imsize, 'intent': intent, 'gridder': gridder, 'mask': mask, 'nbin': nbin, 'nchan': nchan, 'niter': niter, 'nterms': nterms, 'parameter_file': parameter_file, 'pblimit': pblimit, 'phasecenter': phasecenter, 'reffreq': reffreq, 'restfreq': restfreq, 'robust': robust, 'scales': scales, 'specmode': specmode, 'spw': spw, 'start': start, 'stokes': stokes, 'sensitivity': sensitivity, 'threshold': threshold, 'nsigma': nsigma, 'uvtaper': uvtaper, 'uvrange': uvrange, 'width': width, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hif_editimlist', [ 'imagename=' + repr(_pc.document['imagename']), 'search_radius_arcsec=' + repr(_pc.document['search_radius_arcsec']), 'cell=' + repr(_pc.document['cell']), 'cfcache=' + repr(_pc.document['cfcache']), 'conjbeams=' + repr(_pc.document['conjbeams']), 'cyclefactor=' + repr(_pc.document['cyclefactor']), 'cycleniter=' + repr(_pc.document['cycleniter']), 'datacolumn=' + repr(_pc.document['datacolumn']), 'deconvolver=' + repr(_pc.document['deconvolver']), 'editmode=' + repr(_pc.document['editmode']), 'field=' + repr(_pc.document['field']), 'imaging_mode=' + repr(_pc.document['imaging_mode']), 'imsize=' + repr(_pc.document['imsize']), 'intent=' + repr(_pc.document['intent']), 'gridder=' + repr(_pc.document['gridder']), 'mask=' + repr(_pc.document['mask']), 'nbin=' + repr(_pc.document['nbin']), 'nchan=' + repr(_pc.document['nchan']), 'niter=' + repr(_pc.document['niter']), 'nterms=' + repr(_pc.document['nterms']), 'parameter_file=' + repr(_pc.document['parameter_file']), 'pblimit=' + repr(_pc.document['pblimit']), 'phasecenter=' + repr(_pc.document['phasecenter']), 'reffreq=' + repr(_pc.document['reffreq']), 'restfreq=' + repr(_pc.document['restfreq']), 'robust=' + repr(_pc.document['robust']), 'scales=' + repr(_pc.document['scales']), 'specmode=' + repr(_pc.document['specmode']), 'spw=' + repr(_pc.document['spw']), 'start=' + repr(_pc.document['start']), 'stokes=' + repr(_pc.document['stokes']), 'sensitivity=' + repr(_pc.document['sensitivity']), 'threshold=' + repr(_pc.document['threshold']), 'nsigma=' + repr(_pc.document['nsigma']), 'uvtaper=' + repr(_pc.document['uvtaper']), 'uvrange=' + repr(_pc.document['uvrange']), 'width=' + repr(_pc.document['width']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hif_editimlist', _hif_editimlist_t( _pc.document['imagename'], _pc.document['search_radius_arcsec'], _pc.document['cell'], _pc.document['cfcache'], _pc.document['conjbeams'], _pc.document['cyclefactor'], _pc.document['cycleniter'], _pc.document['datacolumn'], _pc.document['deconvolver'], _pc.document['editmode'], _pc.document['field'], _pc.document['imaging_mode'], _pc.document['imsize'], _pc.document['intent'], _pc.document['gridder'], _pc.document['mask'], _pc.document['nbin'], _pc.document['nchan'], _pc.document['niter'], _pc.document['nterms'], _pc.document['parameter_file'], _pc.document['pblimit'], _pc.document['phasecenter'], _pc.document['reffreq'], _pc.document['restfreq'], _pc.document['robust'], _pc.document['scales'], _pc.document['specmode'], _pc.document['spw'], _pc.document['start'], _pc.document['stokes'], _pc.document['sensitivity'], _pc.document['threshold'], _pc.document['nsigma'], _pc.document['uvtaper'], _pc.document['uvrange'], _pc.document['width'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hif_editimlist = _hif_editimlist( )