##################### generated by xml-casa (v2) from hifa_imageprecheck.xml ########
##################### 584c9b8fc9ee0e3ad1d4384eaa033809 ##############################
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_hifa_imageprecheck import hifa_imageprecheck as _hifa_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 _hifa_imageprecheck:
"""
hifa_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']
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=[ ], calcsb=False, parallel='automatic', pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, '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, 'calcsb': calcsb, 'parallel': parallel, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hifa_imageprecheck', [ 'vis=' + repr(_pc.document['vis']), '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_, 'hifa_imageprecheck', _hifa_imageprecheck_t( _pc.document['vis'], _pc.document['calcsb'], _pc.document['parallel'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hifa_imageprecheck = _hifa_imageprecheck( )