Source code for pipeline.hifv.cli.hifv_syspower

##################### generated by xml-casa (v2) from hifv_syspower.xml #############
##################### 291ecbb875747e579f55b10f69382e0e ##############################
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_syspower import hifv_syspower as _hifv_syspower_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_syspower:
    """
    hifv_syspower ---- Base syspower task

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

    vis              List of input visibility data
    clip_sp_template Clipping range
    antexclude       csv string list of antennas to exclude
    usemedian        If antexclude is specified with usemedian=False, the template values are replaced with 1.0.
                     If usemedian = True, the template values are replaced with the median of the good antennas
    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.

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

    
    Output:
    
    results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
    the results object for the pipeline task is returned.
    
    
    Examples
    
    1. Basic syspower task
    
    hifv_syspower()


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Base syspower task"""

    def __call__( self, vis=[  ], clip_sp_template=[ float(0.7),float(1.2) ], antexclude='', usemedian=False, pipelinemode='automatic', dryrun=False, acceptresults=True ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'clip_sp_template': {'type': 'cFloatVec', 'coerce': [_coerce.to_list,_coerce.to_floatvec]}, 'antexclude': {'type': 'cStr', 'coerce': _coerce.to_str}, 'usemedian': {'type': 'cBool'}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
        doc = {'vis': vis, 'clip_sp_template': clip_sp_template, 'antexclude': antexclude, 'usemedian': usemedian, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hifv_syspower', [ 'vis=' + repr(_pc.document['vis']), 'clip_sp_template=' + repr(_pc.document['clip_sp_template']), 'antexclude=' + repr(_pc.document['antexclude']), 'usemedian=' + repr(_pc.document['usemedian']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
        return _end_log( _logging_state_, 'hifv_syspower', _hifv_syspower_t( _pc.document['vis'], _pc.document['clip_sp_template'], _pc.document['antexclude'], _pc.document['usemedian'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hifv_syspower = _hifv_syspower( )