Source code for pipeline.hif.cli.hif_polarization

##################### generated by xml-casa (v2) from hif_polarization.xml ##########
##################### e8a117939a3b1db27b84c64d7bc59525 ##############################
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_polarization import hif_polarization as _hif_polarization_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_polarization:
    """
    hif_polarization ---- Base polarization task

    --------- parameter descriptions ---------------------------------------------

    vis           List of input visibility data
    pipelinemode  The pipeline operating mode
    dryrun        Run the task (False) or display task command (True)
    acceptresults Add the results into the pipeline context

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

    
    The hif_polarization task
    
    Keyword arguments:
    
    ---- pipeline parameter arguments which can be set in any pipeline mode
    
    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.
    default: []
    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.
    default: 'automatic'.
    
    ---- pipeline context defined parameter argument which can be set only in
    'interactive mode'
    
    
    --- pipeline task execution modes
    
    dryrun -- Run the commands (True) or generate the commands to be run but
    do not execute (False).
    default: True
    
    acceptresults -- Add the results of the task to the pipeline context (True) or
    reject them (False).
    default: True
    
    Output:
    
    results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
    the results object for the pipeline task is returned.
    
    
    Examples
    
    1. Basic polarization task
    
    hif_polarization()


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Base polarization task"""

    def __call__( self, vis=[  ], pipelinemode='automatic', dryrun=False, acceptresults=True ):
        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'}}
        doc = {'vis': vis, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hif_polarization', [ 'vis=' + repr(_pc.document['vis']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
        return _end_log( _logging_state_, 'hif_polarization', _hif_polarization_t( _pc.document['vis'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hif_polarization = _hif_polarization( )