Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/testconcat.py: 56%
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 testconcat.xml ################
2##################### ab4e58e1beb9e0a5c4d05f506de8e425 ##############################
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_testconcat import testconcat as _testconcat_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 _testconcat:
15 """
16 testconcat ---- Concatenate the subtables of several visibility data sets, not the MAIN bulk data.
18 --------- parameter descriptions ---------------------------------------------
20 vis Name(s) of input visibility files to be test-concatenated
21 testconcatvis Name of output MS containing the merged subtables
22 freqtol Frequency shift tolerance for considering data as the same spwid
23 dirtol Direction shift tolerance for considering data as the same field
24 copypointing Copy all rows of the POINTING table.
26 --------- examples -----------------------------------------------------------
30 The list of data sets given in the vis argument are concatenated into an output
31 data set in testconcatvis without the bulk data of the MAIN table.
32 This is useful for obtaining the information in the merged subtables without
33 actually performing a time-consuming concatenation of the MAIN tables on disk.
36 Keyword arguments:
37 vis -- Name of input visibility files for which the subtables are to be combined
38 default: none; example: vis = 'mydata.ms',
39 vis=['src2.ms','ngc5921.ms','ngc315.ms']
40 testconcatvis -- Name of MS that will contain the concatenated subtables
41 default: none; example: testconcatvis='test.ms'
43 freqtol -- Frequency shift tolerance for considering data to be in the same
44 spwid. The number of channels must also be the same.
45 default: '' do not combine unless frequencies are equal
46 example: freqtol='10MHz' will not combine spwid unless they are
47 within 10 MHz.
48 Note: This option is useful to conbine spectral windows with very slight
49 frequency differences caused by Doppler tracking, for example.
51 dirtol -- Direction shift tolerance for considering data as the same field
52 default: '' means always combine.
53 example: dirtol='1.arcsec' will not combine data for a field unless
54 their phase center differ by less than 1 arcsec. If the field names
55 are different in the input data sets, the name in the output data
56 set will be the first relevant data set in the list.
58 copypointing -- Make a proper copy of the POINTING subtable (can be time consuming).
59 If False, the result is an empty POINTING table.
60 default: True
63 """
65 _info_group_ = """manipulation"""
66 _info_desc_ = """Concatenate the subtables of several visibility data sets, not the MAIN bulk data."""
68 def __call__( self, vis=[ ], testconcatvis='', freqtol='', dirtol='', copypointing=True ):
69 schema = {'vis': {'type': 'cReqPathVec', 'coerce': [_coerce.to_list,_coerce.expand_pathvec]}, 'testconcatvis': {'type': 'cStr', 'coerce': _coerce.to_str}, 'freqtol': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'dirtol': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'copypointing': {'type': 'cBool'}}
70 doc = {'vis': vis, 'testconcatvis': testconcatvis, 'freqtol': freqtol, 'dirtol': dirtol, 'copypointing': copypointing}
71 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
72 _logging_state_ = _start_log( 'testconcat', [ 'vis=' + repr(_pc.document['vis']), 'testconcatvis=' + repr(_pc.document['testconcatvis']), 'freqtol=' + repr(_pc.document['freqtol']), 'dirtol=' + repr(_pc.document['dirtol']), 'copypointing=' + repr(_pc.document['copypointing']) ] )
73 task_result = None
74 try:
75 task_result = _testconcat_t( _pc.document['vis'], _pc.document['testconcatvis'], _pc.document['freqtol'], _pc.document['dirtol'], _pc.document['copypointing'] )
76 except Exception as exc:
77 _except_log('testconcat', exc)
78 raise
79 finally:
80 task_result = _end_log( _logging_state_, 'testconcat', task_result )
81 return task_result
83testconcat = _testconcat( )