Source code for pipeline.hif.cli.hif_findcont

##################### generated by xml-casa (v2) from hif_findcont.xml ##############
##################### b513b8617d58b673d59ece396d5eb1ce ##############################
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_findcont import hif_findcont as _hif_findcont_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_findcont:
    """
    hif_findcont ---- Find continuum frequency ranges

    
    Find continuum frequency ranges for a list of specified targets.
    
    results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
    the results object for the pipeline task is returned.

    --------- 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']
    target_list             Dictionary specifying targets to be imaged; blank will read list from context
    mosweight               Mosaic weighting
    hm_perchanweightdensity Calculate the weight density for each channel independently
    parallel                Use MPI cluster where possible
    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_ = """Find continuum frequency ranges"""

    def __call__( self, vis=[  ], target_list=[ ], mosweight=False, hm_perchanweightdensity=False, parallel='automatic', pipelinemode='automatic', dryrun=False, acceptresults=True ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'target_list': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'mosweight': {'type': 'cBool'}, 'hm_perchanweightdensity': {'type': 'cBool'}, 'parallel': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'true', 'false' ]}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
        doc = {'vis': vis, 'target_list': target_list, 'mosweight': mosweight, 'hm_perchanweightdensity': hm_perchanweightdensity, 'parallel': parallel, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hif_findcont', [ 'vis=' + repr(_pc.document['vis']), 'target_list=' + repr(_pc.document['target_list']), 'mosweight=' + repr(_pc.document['mosweight']), 'hm_perchanweightdensity=' + repr(_pc.document['hm_perchanweightdensity']), 'parallel=' + repr(_pc.document['parallel']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
        return _end_log( _logging_state_, 'hif_findcont', _hif_findcont_t( _pc.document['vis'], _pc.document['target_list'], _pc.document['mosweight'], _pc.document['hm_perchanweightdensity'], _pc.document['parallel'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hif_findcont = _hif_findcont( )