Source code for pipeline.hifv.cli.hifv_fluxboot2

##################### generated by xml-casa (v2) from hifv_fluxboot2.xml ############
##################### e9395c11f6614f83a05ac3dd1e01708c ##############################
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_fluxboot2 import hifv_fluxboot2 as _hifv_fluxboot2_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_fluxboot2:
    """
    hifv_fluxboot2 ---- Fluxboot2

    --------- 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']
    caltable      String name of the flagged caltable
    fitorder      Polynomial order of the spectral fitting for valid flux densities
                  with multiple spws.  The default value of -1 means that the heuristics determine the fit order based on
                  fractional bandwidth and receiver bands present in the observation.
                  An override value of 0,1,2,3 or 4 may be specified by the user.
                  Spectral index (1) and, if applicable, curvature (2) are reported in the weblog.
                  If no determination can be made by the heuristics, a fitorder of 1 will be used.
    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
                  Example:  refantignore='ea02,ea03'

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

    
    Output:
    
    results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
    the results object for the pipeline task is returned.
    
    
    Examples
    
    1. VLA CASA pipeline flux density bootstrapping.
    
    hifv_fluxboot2()


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Fluxboot2"""

    def __call__( self, vis=[  ], caltable='', fitorder=int(-1), pipelinemode='automatic', dryrun=False, acceptresults=True, refantignore='' ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'caltable': {'type': 'cStr', 'coerce': _coerce.to_str}, 'fitorder': {'type': 'cInt'}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}, 'refantignore': {'type': 'cStr', 'coerce': _coerce.to_str}}
        doc = {'vis': vis, 'caltable': caltable, 'fitorder': fitorder, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults, 'refantignore': refantignore}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hifv_fluxboot2', [ 'vis=' + repr(_pc.document['vis']), 'caltable=' + repr(_pc.document['caltable']), 'fitorder=' + repr(_pc.document['fitorder']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']), 'refantignore=' + repr(_pc.document['refantignore']) ] )
        return _end_log( _logging_state_, 'hifv_fluxboot2', _hifv_fluxboot2_t( _pc.document['vis'], _pc.document['caltable'], _pc.document['fitorder'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'], _pc.document['refantignore'] ) )

hifv_fluxboot2 = _hifv_fluxboot2( )