Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/conjugatevis.py: 100%
27 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-11-01 07:19 +0000
1##################### generated by xml-casa (v2) from conjugatevis.xml ##############
2##################### a64a52276ec6946f632d548311bb05b3 ##############################
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_conjugatevis import conjugatevis as _conjugatevis_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 _conjugatevis:
15 """
16 conjugatevis ---- Change the sign of the phases in all visibility columns.
19 Change the sign of the phases in all visibility columns.
21 --------- parameter descriptions ---------------------------------------------
23 vis Name of input visibility file
24 Default: none
26 Example: vis='ngc5921.ms'
27 spwlist Spectral window selection
28 Default:[] (all spws will be conjugated)
30 Example: spw=[1,2]
31 outputvis Name of output visibility file
32 Default: 'conjugated\_'+vis
34 Example: outputvis='conjugated.ms'
35 overwrite Overwrite the outputvis if it exists?
36 Default: False
37 Options: False|True
39 --------- examples -----------------------------------------------------------
43 For more information, see the task pages of conjugatevis in CASA Docs:
45 https://casa.nrao.edu/casadocs/
48 """
50 _info_group_ = """manipulation"""
51 _info_desc_ = """Change the sign of the phases in all visibility columns."""
53 def __call__( self, vis='', spwlist=[ ], outputvis='', overwrite=False ):
54 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'spwlist': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'outputvis': {'type': 'cStr', 'coerce': _coerce.to_str}, 'overwrite': {'type': 'cBool'}}
55 doc = {'vis': vis, 'spwlist': spwlist, 'outputvis': outputvis, 'overwrite': overwrite}
56 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
57 _logging_state_ = _start_log( 'conjugatevis', [ 'vis=' + repr(_pc.document['vis']), 'spwlist=' + repr(_pc.document['spwlist']), 'outputvis=' + repr(_pc.document['outputvis']), 'overwrite=' + repr(_pc.document['overwrite']) ] )
58 task_result = None
59 try:
60 task_result = _conjugatevis_t( _pc.document['vis'], _pc.document['spwlist'], _pc.document['outputvis'], _pc.document['overwrite'] )
61 except Exception as exc:
62 _except_log('conjugatevis', exc)
63 raise
64 finally:
65 task_result = _end_log( _logging_state_, 'conjugatevis', task_result )
66 return task_result
68conjugatevis = _conjugatevis( )