##################### generated by xml-casa (v2) from hif_transformimagedata.xml ####
##################### 4223a2feef5b7b814e4076af9eea922a ##############################
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_transformimagedata import hif_transformimagedata as _hif_transformimagedata_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_transformimagedata:
"""
hif_transformimagedata ---- Base transformimagedata task
The hif_transformimagedata task.
Output:
results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
--------- parameter descriptions ---------------------------------------------
vis List of visibility data files. These may be ASDMs, tar files of ASDMs,
MSs, or tar files of MSs, If ASDM files are specified, they will be
converted to MS format.
example: vis=['X227.ms', 'asdms.tar.gz']
outputvis The output MeasurementSet.
field Set of data selection field names or ids, \'\' for all.
intent Set of data selection intents, \'\' for all.
spw Set of data selection spectral window ids \'\' for all.
datacolumn Select spectral windows to split. The standard CASA options are
supported
example: 'data', 'model'
chanbin
timebin Bin width for time averaging.
replace If a split was performed delete the parent MS and remove it from the context.
example: True or False
clear_pointing Clear the pointing table.
modify_weights Re-initialize the weights.
wtmode optional weight initialization mode when modify_weights=True
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 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 -----------------------------------------------------------
1. Basic transformimagedata task
hif_transformimagedata()
"""
_info_group_ = """pipeline"""
_info_desc_ = """Base transformimagedata task"""
def __call__( self, vis=[ ], outputvis='', field='', intent='', spw='', datacolumn='corrected', chanbin=int(1), timebin='0s', replace=False, clear_pointing=True, modify_weights=False, wtmode='', pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'outputvis': {'type': 'cStr', 'coerce': _coerce.to_str}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'type': 'cStr', 'coerce': _coerce.to_str}, 'datacolumn': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'DATA', 'model', 'corrected', 'LAG_DATA', 'lag_data', 'FLOAT_DATA,DATA', 'FLOAT_DATA', 'CORRECTED', 'lag_data,data', 'float_data', 'float_data,data', 'DATA,MODEL,CORRECTED', 'ALL', 'MODEL', 'all', 'data,model,corrected', 'LAG_DATA,DATA', 'data' ]}, 'chanbin': {'type': 'cInt', 'allowed': [ 1, 2, 4, 8, 16 ]}, 'timebin': {'type': 'cStr', 'coerce': _coerce.to_str}, 'replace': {'type': 'cBool'}, 'clear_pointing': {'type': 'cBool'}, 'modify_weights': {'type': 'cBool'}, 'wtmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'vis': vis, 'outputvis': outputvis, 'field': field, 'intent': intent, 'spw': spw, 'datacolumn': datacolumn, 'chanbin': chanbin, 'timebin': timebin, 'replace': replace, 'clear_pointing': clear_pointing, 'modify_weights': modify_weights, 'wtmode': wtmode, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hif_transformimagedata', [ 'vis=' + repr(_pc.document['vis']), 'outputvis=' + repr(_pc.document['outputvis']), 'field=' + repr(_pc.document['field']), 'intent=' + repr(_pc.document['intent']), 'spw=' + repr(_pc.document['spw']), 'datacolumn=' + repr(_pc.document['datacolumn']), 'chanbin=' + repr(_pc.document['chanbin']), 'timebin=' + repr(_pc.document['timebin']), 'replace=' + repr(_pc.document['replace']), 'clear_pointing=' + repr(_pc.document['clear_pointing']), 'modify_weights=' + repr(_pc.document['modify_weights']), 'wtmode=' + repr(_pc.document['wtmode']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hif_transformimagedata', _hif_transformimagedata_t( _pc.document['vis'], _pc.document['outputvis'], _pc.document['field'], _pc.document['intent'], _pc.document['spw'], _pc.document['datacolumn'], _pc.document['chanbin'], _pc.document['timebin'], _pc.document['replace'], _pc.document['clear_pointing'], _pc.document['modify_weights'], _pc.document['wtmode'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hif_transformimagedata = _hif_transformimagedata( )