##################### generated by xml-casa (v2) from h_import_calstate.xml #########
##################### 3222570ebbea4375c8d0151548398a0c ##############################
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_h_import_calstate import h_import_calstate as _h_import_calstate_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _h_import_calstate:
"""
h_import_calstate ---- Import a calibration state from disk
h_import_calstate clears and then recreates the pipeline calibration state
based on the set of applycal calls given in the named file. The applycal
statements are interpreted in additive fashion; for identically specified
data selection targets, caltables specified in later statements will be added
to the state created by earlier calls.
--------- parameter descriptions ---------------------------------------------
filename Name of the saved calibration state
--------- examples -----------------------------------------------------------
Example
1. Import a calibration state from disk.
h_import_calstate(filename='aftergaincal.calstate')
"""
_info_group_ = """pipeline"""
_info_desc_ = """Import a calibration state from disk"""
def __call__( self, filename='' ):
schema = {'filename': {'type': 'cStr', 'coerce': _coerce.to_str}}
doc = {'filename': filename}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'h_import_calstate', [ 'filename=' + repr(_pc.document['filename']) ] )
return _end_log( _logging_state_, 'h_import_calstate', _h_import_calstate_t( _pc.document['filename'] ) )
h_import_calstate = _h_import_calstate( )