Source code for pipeline.hifas.cli.hifas_imageprecheck

##################### generated by xml-casa (v2) from hifas_imageprecheck.xml #######
##################### 601460e00cb5bbd639cf142e5804e797 ##############################
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_hifas_imageprecheck import hifas_imageprecheck as _hifas_imageprecheck_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log

class _hifas_imageprecheck:
    """
    hifas_imageprecheck ---- Calculates the best robust value and Briggs weighting parameter to achieve sensitivity and angular resolution goals.

    
    In this task, the representative source and the spw containing the
    representative frequency selected by the PI in the OT are used to calculate
    the synthesized beam and to make sensitivity estimates for the aggregate
    bandwidth and representative bandwidth for several values of the robust parameter.
    This information is reported in a table in the weblog. If no representative
    target/frequency information is available, it defaults to the first target
    and center of first spw in the data (i.e. pre-Cycle 5 data does not have
    this information available). The best Briggs weighting parameter to achieve
    the PI's desired angular resolution is chosen automatically.
    See the User's guide for further details.
    
    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']
    desired_angular_resolution User specified angular resolution goal string.
                               '': automatic from performance parameters (default)
                               
                               Example: '1.0arcsec'
    calcsb                     Force (re-)calculation of sensitivities and beams
    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_ = """Calculates the best robust value and Briggs weighting parameter to achieve sensitivity and angular resolution goals."""

    def __call__( self, vis=[  ], desired_angular_resolution='', calcsb=False, parallel='automatic', pipelinemode='automatic', dryrun=False, acceptresults=True ):
        schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'desired_angular_resolution': {'type': 'cStr', 'coerce': _coerce.to_str}, 'calcsb': {'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, 'desired_angular_resolution': desired_angular_resolution, 'calcsb': calcsb, 'parallel': parallel, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
        assert _pc.validate(doc,schema), str(_pc.errors)
        _logging_state_ = _start_log( 'hifas_imageprecheck', [ 'vis=' + repr(_pc.document['vis']), 'desired_angular_resolution=' + repr(_pc.document['desired_angular_resolution']), 'calcsb=' + repr(_pc.document['calcsb']), '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_, 'hifas_imageprecheck', _hifas_imageprecheck_t( _pc.document['vis'], _pc.document['desired_angular_resolution'], _pc.document['calcsb'], _pc.document['parallel'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )

hifas_imageprecheck = _hifas_imageprecheck( )