Source code for pipeline.h.cli.h_tsyscal

##################### generated by xml-casa (v2) from h_tsyscal.xml #################
##################### b8a7d22e10775d6b2268070a78d5077c ##############################
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_h_tsyscal import h_tsyscal as _h_tsyscal_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log

class _h_tsyscal:
    """
    h_tsyscal ---- Derive a Tsys calibration table

    
    Derive the Tsys calibration for list of ALMA MeasurementSets.
    
    Issues
    
    
    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 input visibility files.
                  Parameter is not available when pipelinemode='automatic'.
                  example: vis=['ngc5921.ms']
    caltable      Name of output gain calibration tables.
                  Parameter is not available when pipelinemode='automatic'.
                  example: caltable='ngc5921.gcal'
    chantol       The tolerance in channels for mapping atmospheric calibration
                  windows (TDM) to science windows (FDM or TDM).
                  example: chantol=5
    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 task (False) or list commands (True).
                  Parameter is available only when pipelinemode='interactive'.
    acceptresults Add the results of the task to the pipeline context (True) or
                  Parameter is available only when pipelinemode='interactive'.

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

    


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Derive a Tsys calibration table"""

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

h_tsyscal = _h_tsyscal( )