Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/rerefant.py: 56%
27 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 19:53 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 19:53 +0000
1##################### generated by xml-casa (v2) from rerefant.xml ##################
2##################### c49ff2da9fee7559c58af00c6fc27ad4 ##############################
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_rerefant import rerefant as _rerefant_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 _rerefant:
15 """
16 rerefant ---- Re-apply refant to a caltable
19 TBD
22 --------- parameter descriptions ---------------------------------------------
24 vis Name of input visibility file (MS)
25 tablein Input calibration table
26 caltable Output calibration table (overwrite tablein if unspecified)
27 refantmode Refant algorithm to use
28 refant Reference antenna name(s)
29 [1;42mRETURNS[1;m void
31 --------- examples -----------------------------------------------------------
36 TBD...
38 Keyword arguments:
39 vis -- Name of input visibility file
40 default: none; example: vis='ngc5921.ms'
41 tablein -- Input calibration table (G or T)
42 default: none; example: tablein='ngc5921.gcal'
43 caltable -- Output calibration table
44 default: '' (will overwrite tablein);
45 example: caltable='ngc5921_newrefant.gcal'
46 refantmode -- The phase refant algorithm to use
47 default: 'flex'; example: refantmode='flex'
48 Options: 'flex','strict'
49 refant -- Reference antenna name(s); a prioritized list may be specified
50 default: '' => no refant applied
51 example: refant='4' (antenna with index 4)
52 refant='VA04' (VLA antenna #4)
53 refant='EA02,EA23,EA13' (EVLA antenna EA02, use
54 EA23 and EA13 as alternates if/when EA02
55 drops out)
56 Use taskname=listobs for antenna listing
60 """
62 _info_group_ = """calibration"""
63 _info_desc_ = """Re-apply refant to a caltable"""
65 def __call__( self, vis='', tablein='', caltable='', refantmode='flex', refant='' ):
66 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'tablein': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'caltable': {'type': 'cStr', 'coerce': _coerce.to_str}, 'refantmode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'flex', 'strict' ]}, 'refant': {'type': 'cStr', 'coerce': _coerce.to_str}}
67 doc = {'vis': vis, 'tablein': tablein, 'caltable': caltable, 'refantmode': refantmode, 'refant': refant}
68 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
69 _logging_state_ = _start_log( 'rerefant', [ 'vis=' + repr(_pc.document['vis']), 'tablein=' + repr(_pc.document['tablein']), 'caltable=' + repr(_pc.document['caltable']), 'refantmode=' + repr(_pc.document['refantmode']), 'refant=' + repr(_pc.document['refant']) ] )
70 task_result = None
71 try:
72 task_result = _rerefant_t( _pc.document['vis'], _pc.document['tablein'], _pc.document['caltable'], _pc.document['refantmode'], _pc.document['refant'] )
73 except Exception as exc:
74 _except_log('rerefant', exc)
75 raise
76 finally:
77 task_result = _end_log( _logging_state_, 'rerefant', task_result )
78 return task_result
80rerefant = _rerefant( )