##################### generated by xml-casa (v2) from hifv_statwt.xml ###############
##################### 52daab7324f9544fe35c5521c059343d ##############################
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_hifv_statwt import hifv_statwt as _hifv_statwt_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _hifv_statwt:
"""
hifv_statwt ---- Statwt
--------- parameter descriptions ---------------------------------------------
vis List of visibility data files. These may be ASDMs, tar files of ASDMs,
MSes, or tar files of MSes, If ASDM files are specified, they will be
converted to MS format.
example: vis=['X227.ms', 'asdms.tar.gz']
datacolumn Data column to use to compute weights. Supported values are "data", "corrected", "residual", and "residual_data" (case insensitive, minimum match supported).
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.
overwrite_modelcol Always write the model column, even if it already exists
dryrun Run the commands (True) or generate the commands to be run but
do not execute (False). This is a pipeline task execution mode.
acceptresults Add the results of the task to the pipeline context (True) or
reject them (False). This is a pipeline task execution mode.
--------- examples -----------------------------------------------------------
Output:
results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
Examples
1. Statistical weighting of the visibilities:
hifv_statwt()
"""
_info_group_ = """pipeline"""
_info_desc_ = """Statwt"""
def __call__( self, vis=[ ], datacolumn='corrected', pipelinemode='automatic', overwrite_modelcol=False, dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'datacolumn': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'overwrite_modelcol': {'type': 'cBool'}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'vis': vis, 'datacolumn': datacolumn, 'pipelinemode': pipelinemode, 'overwrite_modelcol': overwrite_modelcol, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hifv_statwt', [ 'vis=' + repr(_pc.document['vis']), 'datacolumn=' + repr(_pc.document['datacolumn']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'overwrite_modelcol=' + repr(_pc.document['overwrite_modelcol']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hifv_statwt', _hifv_statwt_t( _pc.document['vis'], _pc.document['datacolumn'], _pc.document['pipelinemode'], _pc.document['overwrite_modelcol'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hifv_statwt = _hifv_statwt( )