Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/uvsub.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 uvsub.xml #####################
2##################### afa640a44f743b128d93bb7d27ef5d5b ##############################
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_uvsub import uvsub as _uvsub_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 _uvsub:
15 """
16 uvsub ---- Subtract/add model from/to the corrected visibility data.
19 This function subtracts model visibility data (MODEL_DATA column) from corrected visibility
20 data (CORRECTED_DATA column) leaving the residuals in the corrected data column. If the
21 parameter 'reverse' is set true, the process is reversed. Note the DATA column is left untouched.
22 If the ms has no CORRECTED _DATA column, one is made, copying DATA column, ahead of doing the
23 uvsub process
26 --------- parameter descriptions ---------------------------------------------
28 vis Name of input visibility file (MS)
29 reverse reverse the operation (add rather than subtract)
30 [1;42mRETURNS[1;m void
32 --------- examples -----------------------------------------------------------
35 Help for uvsub task
37 This function subtracts model visibility data from corrected visibility
38 data leaving the residuals in the corrected data column. If the
39 parameter 'reverse' is set true, the process is reversed.
40 Please note the model visibility used is the one that has been saved in the MODEL_DATA of the MS and the
41 CORRECTED_DATA column is the one that is modified. If no CORRECTED_DATA column exists in the MS, one will be created and
42 a copy of the DATA column is saved in it before the uvsub operation selected is performed. uvsub does not modify the DATA column.
44 Keyword arguments:
45 vis -- Name of input visibility file (MS)
46 default: none; example: vis='ngc5921.ms'
47 reverse -- Reverse the operation (add rather than subtract)
48 default: False; example: reverse=true
50 uvsub(vis='ngc5921.ms', reverse=False)
55 """
57 _info_group_ = """manipulation, calibration"""
58 _info_desc_ = """Subtract/add model from/to the corrected visibility data."""
60 def __call__( self, vis='', reverse=False ):
61 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'reverse': {'type': 'cBool'}}
62 doc = {'vis': vis, 'reverse': reverse}
63 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
64 _logging_state_ = _start_log( 'uvsub', [ 'vis=' + repr(_pc.document['vis']), 'reverse=' + repr(_pc.document['reverse']) ] )
65 task_result = None
66 try:
67 task_result = _uvsub_t( _pc.document['vis'], _pc.document['reverse'] )
68 except Exception as exc:
69 _except_log('uvsub', exc)
70 raise
71 finally:
72 task_result = _end_log( _logging_state_, 'uvsub', task_result )
73 return task_result
75uvsub = _uvsub( )