Source code for pipeline.hifv.cli.hifv_vlasetjy

##################### generated by xml-casa (v2) from hifv_vlasetjy.xml #############
##################### d2e02127e4e501b8644193790aa2764a ##############################
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_vlasetjy import hifv_vlasetjy as _hifv_vlasetjy_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_vlasetjy:
    """
    hifv_vlasetjy ---- Does an initial setjy run on the vis

    --------- 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']
    field         List of field names or ids.  Only can be set in pipelinemode='interactive'.
    intent        Observing intent of flux calibrators.  Only can be set in pipelinemode='interactive'.
    spw           List of spectral window ids.  Only can be set in pipelinemode='interactive'.
    model         File location for field model.  Only can be set in pipelinemode='interactive'.
    reffile       Path to file with fluxes for non-solar system calibrators.  Only can be set in pipelinemode='interactive'
    fluxdensity   Specified flux density [I,Q,U,V]; -1 will lookup values
    spix          Spectral index of fluxdensity.  Can be set when fluxdensity is not -1
    reffreq       Reference frequency for spix.  Can be set when fluxdensity is not -1
    scalebychan   Scale the flux density on a per channel basis or else on a per spw basis
    standard      Flux density standard
    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 -----------------------------------------------------------

    
    The hifv_vlasetjy task does an initial run of setjy on the vis
    
    
    Output:
    
    results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
    the results object for the pipeline task is returned.
    
    standard -- Flux density standard
    default: ''
    
    Examples
    
    1. Initial run of setjy:
    
    hifv_vlasetjy()


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Does an initial setjy run on the vis"""

    def __call__( self, vis=[  ], field='', intent='', spw='', model='', reffile='', fluxdensity=int(-1), spix=float(0.0), reffreq='1GHz', scalebychan=True, standard='', pipelinemode='automatic', dryrun=False, acceptresults=True ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'type': 'cStr', 'coerce': _coerce.to_str}, 'model': {'type': 'cStr', 'coerce': _coerce.to_str}, 'reffile': {'type': 'cStr', 'coerce': _coerce.to_str}, 'fluxdensity': {'anyof': [{'type': 'cInt'}, {'type': 'cIntVec', 'coerce': [_coerce.to_list,_coerce.to_intvec]}, {'type': 'cFloatVec', 'coerce': [_coerce.to_list,_coerce.to_floatvec]}]}, 'spix': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'reffreq': {'type': 'cStr', 'coerce': _coerce.to_str}, 'scalebychan': {'type': 'cBool'}, 'standard': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
        doc = {'vis': vis, 'field': field, 'intent': intent, 'spw': spw, 'model': model, 'reffile': reffile, 'fluxdensity': fluxdensity, 'spix': spix, 'reffreq': reffreq, 'scalebychan': scalebychan, 'standard': standard, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hifv_vlasetjy', [ 'vis=' + repr(_pc.document['vis']), 'field=' + repr(_pc.document['field']), 'intent=' + repr(_pc.document['intent']), 'spw=' + repr(_pc.document['spw']), 'model=' + repr(_pc.document['model']), 'reffile=' + repr(_pc.document['reffile']), 'fluxdensity=' + repr(_pc.document['fluxdensity']), 'spix=' + repr(_pc.document['spix']), 'reffreq=' + repr(_pc.document['reffreq']), 'scalebychan=' + repr(_pc.document['scalebychan']), 'standard=' + repr(_pc.document['standard']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
        return _end_log( _logging_state_, 'hifv_vlasetjy', _hifv_vlasetjy_t( _pc.document['vis'], _pc.document['field'], _pc.document['intent'], _pc.document['spw'], _pc.document['model'], _pc.document['reffile'], _pc.document['fluxdensity'], _pc.document['spix'], _pc.document['reffreq'], _pc.document['scalebychan'], _pc.document['standard'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hifv_vlasetjy = _hifv_vlasetjy( )