##################### generated by xml-casa (v2) from hsd_imaging.xml ###############
##################### 284d296021d66426db3279d74d1d4794 ##############################
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_hsd_imaging import hsd_imaging as _hsd_imaging_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _hsd_imaging:
"""
hsd_imaging ---- Generate single dish images
The hsd_imaging task generates single dish images per antenna as
well as combined image over whole antennas for each field and
spectral window. Image configuration (grid size, number of pixels,
etc.) is automatically determined based on meta data such as
antenna diameter, map extent, etc.
Note that generated images are always in LSRK frame.
Output:
results -- If pipeline mode is 'getinputs' then None is returned.
Otherwise the results object for the pipeline task is
returned.
--------- parameter descriptions ---------------------------------------------
mode imaging mode controls imaging parameters in the task.
Accepts either "line" (spectral line imaging) or "ampcal"
(image settings for amplitude calibrator)
restfreq Rest frequency
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.
infiles List of data files. These must be a name of
MeasurementSets that are registered to context via
hsd_importdata task.
example: vis=['uid___A002_X85c183_X36f.ms',
'uid___A002_X85c183_X60b.ms']
field Data selection by field names or ids.
example: "*Sgr*,M100"
spw Data selection by spw ids.
example: "3,4" (generate images for spw 3 and 4)
dryrun Run the commands (True) or generate the commands to be
run but do not execute (False).
acceptresults Add the results of the task to the pipeline context (True)
or reject them (False).
--------- examples -----------------------------------------------------------
"""
_info_group_ = """pipeline"""
_info_desc_ = """Generate single dish images"""
def __call__( self, mode='line', restfreq=[ ], pipelinemode='automatic', infiles=[ ], field='', spw='', dryrun=False, acceptresults=True ):
schema = {'mode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'line', 'ampcal' ]}, 'restfreq': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'infiles': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'type': 'cStr', 'coerce': _coerce.to_str}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'mode': mode, 'restfreq': restfreq, 'pipelinemode': pipelinemode, 'infiles': infiles, 'field': field, 'spw': spw, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hsd_imaging', [ 'mode=' + repr(_pc.document['mode']), 'restfreq=' + repr(_pc.document['restfreq']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'infiles=' + repr(_pc.document['infiles']), 'field=' + repr(_pc.document['field']), 'spw=' + repr(_pc.document['spw']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hsd_imaging', _hsd_imaging_t( _pc.document['mode'], _pc.document['restfreq'], _pc.document['pipelinemode'], _pc.document['infiles'], _pc.document['field'], _pc.document['spw'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hsd_imaging = _hsd_imaging( )