Coverage for /home/casatest/venv/lib/python3.12/site-packages/casatasks/appendantab.py: 56%
27 statements
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-21 07:43 +0000
« prev ^ index » next coverage.py v7.10.4, created at 2025-08-21 07:43 +0000
1##################### generated by xml-casa (v2) from appendantab.xml ###############
2##################### 162382ab45cd75da8b2d00f491610e97 ##############################
3from __future__ import absolute_import
4import numpy
5from casatools.typecheck import CasaValidator as _val_ctor
6_pc = _val_ctor( )
7from casatools.coercetype import coerce as _coerce
8from casatools.errors import create_error_string
9from .private.task_appendantab import appendantab as _appendantab_t
10from casatasks.private.task_logging import start_log as _start_log
11from casatasks.private.task_logging import end_log as _end_log
12from casatasks.private.task_logging import except_log as _except_log
14class _appendantab:
15 """
16 appendantab ---- Append syscal and gaincurve data from an antab file
19 Provide an MS created from a fitsidi file using importfitsidi and an antab file associated with that data.
20 This task will parse the antab file file and fill the MS SYSCAL and GAIN_CURVE subtables based on the information
21 in the antab file.
23 --------- parameter descriptions ---------------------------------------------
25 vis Name of input visibility file
26 Default: none
28 Example: vis='ngc5921.ms'
29 outvis Name of output visibility file. If the file name specified already exists it will be replaced
30 Default: none
32 Example: caltable='ngc5921.ms'
33 antab Name of antab file to append info from
34 Default: none
36 Example: caltable='bc246b.antab'
37 overwrite Allows the outvis file to be overwritten
38 Default: False
39 append_tsys Use the information from the antab file to create and fill the SYSCAL subtable
40 Default: True
41 append_gc Use the information from the antab file to create and fill the GAIN_CURVE subtable
42 Default: True
44 --------- examples -----------------------------------------------------------
48 For more information, see the task pages of appendantab in CASA Docs:
50 https://casa.nrao.edu/casadocs/
53 """
55 _info_group_ = """calibration"""
56 _info_desc_ = """Append syscal and gaincurve data from an antab file"""
58 def __call__( self, vis='', outvis='', antab='', overwrite=False, append_tsys=True, append_gc=True ):
59 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'outvis': {'type': 'cStr', 'coerce': _coerce.to_str}, 'antab': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'overwrite': {'type': 'cBool'}, 'append_tsys': {'type': 'cBool'}, 'append_gc': {'type': 'cBool'}}
60 doc = {'vis': vis, 'outvis': outvis, 'antab': antab, 'overwrite': overwrite, 'append_tsys': append_tsys, 'append_gc': append_gc}
61 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
62 _logging_state_ = _start_log( 'appendantab', [ 'vis=' + repr(_pc.document['vis']), 'outvis=' + repr(_pc.document['outvis']), 'antab=' + repr(_pc.document['antab']), 'overwrite=' + repr(_pc.document['overwrite']), 'append_tsys=' + repr(_pc.document['append_tsys']), 'append_gc=' + repr(_pc.document['append_gc']) ] )
63 task_result = None
64 try:
65 task_result = _appendantab_t( _pc.document['vis'], _pc.document['outvis'], _pc.document['antab'], _pc.document['overwrite'], _pc.document['append_tsys'], _pc.document['append_gc'] )
66 except Exception as exc:
67 _except_log('appendantab', exc)
68 raise
69 finally:
70 task_result = _end_log( _logging_state_, 'appendantab', task_result )
71 return task_result
73appendantab = _appendantab( )