##################### generated by xml-casa (v2) from hifa_session_refant.xml #######
##################### 5c052ee1fdb74ef4ce775cdbdafec43f ##############################
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_session_refant import hifa_session_refant as _hifa_session_refant_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_session_refant:
"""
hifa_session_refant ---- Select best reference antenna for session(s)
This task re-evaluates the reference antenna lists from all measurement sets
within a session and combines these to select a single common reference
antenna (per session) that is to be used by any subsequent pipeline stages.
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 MeasurementSets. Defaults to the list of
MeasurementSets specified in the pipeline context.
Example: vis=['ngc5921.ms']
phase_threshold Threshold (in degrees) used to identify absolute phase
solution outliers in caltables.
Example: phase_threshold=0.005
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 commands (True) or generate the commands to be run but
do not execute (False).
acceptresults Automatically accept the results of the task into the pipeline context (True)
or reject them (False).
--------- examples -----------------------------------------------------------
1. Compute a single common reference antenna per session:
hifa_session_refant()
"""
_info_group_ = """pipeline"""
_info_desc_ = """Select best reference antenna for session(s)"""
def __call__( self, vis=[ ], phase_threshold=float(0.005), pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'phase_threshold': {'type': 'cFloat', 'coerce': _coerce.to_float}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'vis': vis, 'phase_threshold': phase_threshold, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hifa_session_refant', [ 'vis=' + repr(_pc.document['vis']), 'phase_threshold=' + repr(_pc.document['phase_threshold']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hifa_session_refant', _hifa_session_refant_t( _pc.document['vis'], _pc.document['phase_threshold'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hifa_session_refant = _hifa_session_refant( )