Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/delmod.py: 89%
27 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 17:39 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 17:39 +0000
1##################### generated by xml-casa (v2) from delmod.xml ####################
2##################### 2f0bbe58ff0653115c12b5dc327582ae ##############################
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_delmod import delmod as _delmod_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 _delmod:
15 """
16 delmod ---- Deletes model representations in the MS
19 This utility task is to be used to delete the model visibility data
20 representations in the MS.
22 --------- parameter descriptions ---------------------------------------------
24 vis Name of input visibility file (MS)
25 otf Delete the on-the-fly model data keywords
26 Default=True
28 The 'otf' representation is the 'scratch-less'
29 model data, stored as keywords in the MS header
30 containing model data formation instructions. It
31 is generated by the setjy, ft, and tclean tasks
32 (usescratch=False), and if present, overrides the
33 MODEL_DATA column (if present). If a user wishes
34 to use the MODEL_DATA column _after_ having
35 operated with the 'otf' representation, this task
36 can be used to delete the 'otf' represenatation
37 to make the MODEL_DATA column visible. (Create
38 the MODEL_DATA column by using usescratch=True in
39 setjy, ft, or clean; or by running the clearcal
40 task with addmodel=True.)
41 field Select field using field id(s) or field name(s)
42 Subparameter of otf
43 Default: '' (all fields' models will be deleted)
44 scr Delete the MODEL_DATA scr col (if it exists)
45 Default: False
47 Note: it is not possible to delete the MODEL_DATA
48 column per field.
50 If otf=F and scr=F, delmod will provide a listing
51 of the header field records.
52 [1;42mRETURNS[1;m void
54 --------- examples -----------------------------------------------------------
59 For more information, see the task pages of delmod in CASA Docs:
61 https://casa.nrao.edu/casadocs/
66 """
68 _info_group_ = """imaging, calibration"""
69 _info_desc_ = """Deletes model representations in the MS"""
71 def __call__( self, vis='', otf=True, field='', scr=False ):
72 schema = {'vis': {'type': 'cReqPath', 'coerce': _coerce.expand_path}, 'otf': {'type': 'cBool'}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'scr': {'type': 'cBool'}}
73 doc = {'vis': vis, 'otf': otf, 'field': field, 'scr': scr}
74 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
75 _logging_state_ = _start_log( 'delmod', [ 'vis=' + repr(_pc.document['vis']), 'otf=' + repr(_pc.document['otf']), 'field=' + repr(_pc.document['field']), 'scr=' + repr(_pc.document['scr']) ] )
76 task_result = None
77 try:
78 task_result = _delmod_t( _pc.document['vis'], _pc.document['otf'], _pc.document['field'], _pc.document['scr'] )
79 except Exception as exc:
80 _except_log('delmod', exc)
81 raise
82 finally:
83 task_result = _end_log( _logging_state_, 'delmod', task_result )
84 return task_result
86delmod = _delmod( )