Source code for pipeline.hifv.cli.hifv_selfcal

##################### generated by xml-casa (v2) from hifv_selfcal.xml ##############
##################### 8962126e17075b0055ad65043b3ac09c ##############################
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_selfcal import hifv_selfcal as _hifv_selfcal_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_selfcal:
    """
    hifv_selfcal ---- Selfcal task executing gaincal and applycal

    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,
                       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']
    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).  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.
    refantignore       String list of antennas to ignore
    combine            Data axes which to combine for solve
                       Options: '','obs','scan','spw',field', or any
                       comma-separated combination in a single string
                       
                       Example: combine='scan,spw' - Extend solutions
                       over scan boundaries (up to the solint), and
                       combine spws for solving
    selfcalmode        Heuristics mode selection
    refantmode         Reference antenna mode
    overwrite_modelcol Always write the model column, even if it already exists

    --------- examples -----------------------------------------------------------

    
    Examples
    
    1. Basic selfcal task
    
    hifv_selfcal()


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Selfcal task executing gaincal and applycal"""

    def __call__( self, vis=[  ], pipelinemode='automatic', dryrun=False, acceptresults=True, refantignore='', combine='spw,field', selfcalmode='VLASS', refantmode='strict', overwrite_modelcol=False ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}, 'refantignore': {'type': 'cStr', 'coerce': _coerce.to_str}, 'combine': {'type': 'cStr', 'coerce': _coerce.to_str}, 'selfcalmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'refantmode': {'type': 'cStr', 'coerce': _coerce.to_str}, 'overwrite_modelcol': {'type': 'cBool'}}
        doc = {'vis': vis, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults, 'refantignore': refantignore, 'combine': combine, 'selfcalmode': selfcalmode, 'refantmode': refantmode, 'overwrite_modelcol': overwrite_modelcol}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hifv_selfcal', [ 'vis=' + repr(_pc.document['vis']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']), 'refantignore=' + repr(_pc.document['refantignore']), 'combine=' + repr(_pc.document['combine']), 'selfcalmode=' + repr(_pc.document['selfcalmode']), 'refantmode=' + repr(_pc.document['refantmode']), 'overwrite_modelcol=' + repr(_pc.document['overwrite_modelcol']) ] )
        return _end_log( _logging_state_, 'hifv_selfcal', _hifv_selfcal_t( _pc.document['vis'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'], _pc.document['refantignore'], _pc.document['combine'], _pc.document['selfcalmode'], _pc.document['refantmode'], _pc.document['overwrite_modelcol'] ) )

hifv_selfcal = _hifv_selfcal( )