Source code for pipeline.hif.cli.hif_uvcontfit

##################### generated by xml-casa (v2) from hif_uvcontfit.xml #############
##################### 93ce4e4b04efed7ca90a4d7f99ab9aa3 ##############################
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_uvcontfit import hif_uvcontfit as _hif_uvcontfit_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_uvcontfit:
    """
    hif_uvcontfit ---- Fit the continuum in the UV plane

    
    This task estimates the continuum emission by fitting polynomials to
    the real and imaginary parts of the spectral windows and channels
    selected by spw and exclude spw. This fit represents a model of
    the continuum in all channels. Fit orders less than 2 are strongly
    recommended. Spw window combination is not currently supported.

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

    vis           The list of input MeasurementSets. Defaults to the list of
                  MeasurementSets specified in the h_init or hif_importdata task.
                  '': use all MeasurementSets in the context
                  Examples: 'ngc5921.ms', ['ngc5921a.ms', ngc5921b.ms', 'ngc5921c.ms']
    caltable      The list of output Mueller matrix calibration tables one per
                  input MS. 
                  '': The output names default to the standard pipeline name
                      scheme
    contfile      Name of the input file of per source / spw continuum regions
                  '': Defaults first to the file named in the context, next to a
                      file called 'cont.dat' in the pipeline working directory.
    field         The list of field names or field ids for which UV continuum
                  fits are computed. Defaults to all fields.
                  Eexamples: '3C279', '3C279, M82'
    intent        A string containing a comma delimited list of intents against
                  which the selected fields are matched.
                  '': Defaults to all data with TARGET intent.
    spw           The list of spectral windows and channels for which uv
                  continuum fits are computed.
                  '', Defaults to all science spectral windows.
                  Example: '11,13,15,17'
    combine       Data axes to be combined for solving. Axes are 'scan', 'spw',
                  or ''.
                  This option is currently not supported.
    solint        Time scale for the continuum fit
    fitorder      Polynomial order for the continuum fits
    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 just display the command (True)
    acceptresults Add the results of the task to the pipeline context (True) or
                  reject them (False).

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

    


    """

    _info_group_ = """pipeline"""
    _info_desc_ = """Fit the continuum in the UV plane"""

    def __call__( self, vis=[  ], caltable=[  ], contfile='', field='', intent='', spw='', combine='', solint='int', fitorder=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]}, 'contfile': {'type': 'cStr', 'coerce': _coerce.to_str}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'type': 'cStr', 'coerce': _coerce.to_str}, 'combine': {'type': 'cStr', 'coerce': _coerce.to_str}, 'solint': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'fitorder': {'type': 'cInt'}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
        doc = {'vis': vis, 'caltable': caltable, 'contfile': contfile, 'field': field, 'intent': intent, 'spw': spw, 'combine': combine, 'solint': solint, 'fitorder': fitorder, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hif_uvcontfit', [ 'vis=' + repr(_pc.document['vis']), 'caltable=' + repr(_pc.document['caltable']), 'contfile=' + repr(_pc.document['contfile']), 'field=' + repr(_pc.document['field']), 'intent=' + repr(_pc.document['intent']), 'spw=' + repr(_pc.document['spw']), 'combine=' + repr(_pc.document['combine']), 'solint=' + repr(_pc.document['solint']), 'fitorder=' + repr(_pc.document['fitorder']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
        return _end_log( _logging_state_, 'hif_uvcontfit', _hif_uvcontfit_t( _pc.document['vis'], _pc.document['caltable'], _pc.document['contfile'], _pc.document['field'], _pc.document['intent'], _pc.document['spw'], _pc.document['combine'], _pc.document['solint'], _pc.document['fitorder'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hif_uvcontfit = _hif_uvcontfit( )