##################### generated by xml-casa (v2) from hif_analyzealpha.xml ##########
##################### 0e455143c6bf3027c42228671654d8b2 ##############################
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_analyzealpha import hif_analyzealpha as _hif_analyzealpha_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_analyzealpha:
"""
hif_analyzealpha ---- Base analyzealpha task
Base analyzealpha task.
If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
--------- parameter descriptions ---------------------------------------------
vis List of visisbility 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']
image Restored subimage
alphafile Input spectral index map
alphaerrorfile Input spectral index error map
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 task command (True)
acceptresults Add the results into the pipeline context
--------- examples -----------------------------------------------------------
Examples
1. Basic analyzealpha task
hif_analyzealpha()
"""
_info_group_ = """pipeline"""
_info_desc_ = """Base analyzealpha task"""
def __call__( self, vis=[ ], image='', alphafile='', alphaerrorfile='', pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'image': {'type': 'cStr', 'coerce': _coerce.to_str}, 'alphafile': {'type': 'cStr', 'coerce': _coerce.to_str}, 'alphaerrorfile': {'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, 'image': image, 'alphafile': alphafile, 'alphaerrorfile': alphaerrorfile, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hif_analyzealpha', [ 'vis=' + repr(_pc.document['vis']), 'image=' + repr(_pc.document['image']), 'alphafile=' + repr(_pc.document['alphafile']), 'alphaerrorfile=' + repr(_pc.document['alphaerrorfile']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hif_analyzealpha', _hif_analyzealpha_t( _pc.document['vis'], _pc.document['image'], _pc.document['alphafile'], _pc.document['alphaerrorfile'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hif_analyzealpha = _hif_analyzealpha( )