Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/importvla.py: 89%
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 importvla.xml #################
2##################### b803d2294e3bbe2af64178265f4004b5 ##############################
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_importvla import importvla as _importvla_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 _importvla:
15 """
16 importvla ---- Import VLA archive file(s) to a measurement set
19 Imports an arbitrary number of VLA archive-format data sets into a
20 casa measurement set. If more than one band is present, they will be
21 put in the same measurement set but in a separate spectral window.
22 The task will handle old style and new style VLA (after July 2007)
23 archive data and apply the tsys to the data and to the weights.
25 --------- parameter descriptions ---------------------------------------------
27 archivefiles Name of input VLA archive file(s)
28 Default: none. Must be supplied
30 Examples:
31 archivefiles = 'AP314_A959519.xp1'
32 archivefiles=['AP314_A950519.xp1',
33 'AP314_A950519.xp2']
34 vis Name of output visibility file
35 Default: none. Must be supplied
37 Example: vis='NGC7538.ms'
39 NOTE: Will not over-write existing ms of same
40 name. A backup flag-file version 'Original' will
41 be made in vis.flagversions. See help
42 flagmanager.
43 bandname VLA frequency band name:
44 Default: '' (obtain all bands in the archive
45 file)
46 Options: '4'=48-96 MHz,'P'=298-345
47 MHz,'L'=1.15-1.75 GHz, 'C'=4.2-5.1
48 GHz,'X'=6.8-9.6 GHz,'U'=13.5-16.3 GHz,
49 'K'=20.8-25.8 GHz,'Q'=38-51 GHz
51 Example: bandname='K'
52 frequencytol Tolerance in frequency shift in making spectral windows
53 Default: = 150000.0Hz'
55 Example: frequencytol = 1500000.0 (units = Hz)
57 For Doppler shifted data, less than 10000 Hz may
58 may produce too many unnecessary spectral
59 windows.
60 project Project name to import from archive files
61 Default: '' (all projects in file)
63 Example: project='AL519'
64 Project = 'al519' or AL519 will work.
66 WARNING: Do not include leading zeros; project =
67 'AL0519' will not work.
68 starttime Time after which data will be considered for importing
69 Default: '' (all)
71 syntax: starttime = '2003/1/31/05:05:23'. Date
72 must be included!
73 stoptime Time before which data will be considered for
74 importing
75 Default: '' (all)
77 syntax: starttime = '2003/1/31/08:05:23'. Date
78 must be included!
79 applytsys Apply data scaling and weight scaling by nominal
80 sensitivity (~Tsys)
81 Default: True (strongly recommended)
82 Options: True|False
83 autocorr Import autocorrelations to MS
84 Default: False (no autocorrelations)
85 Options: False|True
86 antnamescheme 'old' or 'new' antenna names.
87 Default: 'new'
88 Options: new|old
90 * 'new' gives antnenna names 'VA04' or 'EA13 for
91 VLA telescopse 04 and 13 (EVLA)
92 * 'old' gives names '04' or '13'
93 keepblanks Should sources with blank names be filled into the data
94 base?
95 Default: False (do not fill)
96 Options: False|True
98 These scans are tipping scans (as of June 1,
99 2009) and should not be filled in the visibility
100 data set.
101 evlabands Use the EVLA's center frequency and bandwidths for
102 frequencies specified via wavelength or band.
103 Default: False
104 Options: False|True
106 --------- examples -----------------------------------------------------------
109 FOR MORE INFORMATION, SEE THE TASK PAGES OF IMPORTVLA IN CASA DOCS:
110 https://casa.nrao.edu/casadocs/
114 """
116 _info_group_ = """import/export"""
117 _info_desc_ = """Import VLA archive file(s) to a measurement set"""
119 def __call__( self, archivefiles=[ ], vis='', bandname='', frequencytol='150000.0Hz', project='', starttime='', stoptime='', applytsys=True, autocorr=False, antnamescheme='new', keepblanks=False, evlabands=False ):
120 schema = {'archivefiles': {'type': 'cReqPathVec', 'coerce': [_coerce.to_list,_coerce.expand_pathvec]}, 'vis': {'type': 'cStr', 'coerce': _coerce.to_str}, 'bandname': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ '4', 'X', 'S', 'P', 'K', 'Ka', 'Q', 'U', 'C', 'L', '' ]}, 'frequencytol': {'type': 'cVariant', 'coerce': [_coerce.to_variant]}, 'project': {'type': 'cStr', 'coerce': _coerce.to_str}, 'starttime': {'type': 'cStr', 'coerce': _coerce.to_str}, 'stoptime': {'type': 'cStr', 'coerce': _coerce.to_str}, 'applytsys': {'type': 'cBool'}, 'autocorr': {'type': 'cBool'}, 'antnamescheme': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'old', 'new' ]}, 'keepblanks': {'type': 'cBool'}, 'evlabands': {'type': 'cBool'}}
121 doc = {'archivefiles': archivefiles, 'vis': vis, 'bandname': bandname, 'frequencytol': frequencytol, 'project': project, 'starttime': starttime, 'stoptime': stoptime, 'applytsys': applytsys, 'autocorr': autocorr, 'antnamescheme': antnamescheme, 'keepblanks': keepblanks, 'evlabands': evlabands}
122 assert _pc.validate(doc,schema), create_error_string(_pc.errors)
123 _logging_state_ = _start_log( 'importvla', [ 'archivefiles=' + repr(_pc.document['archivefiles']), 'vis=' + repr(_pc.document['vis']), 'bandname=' + repr(_pc.document['bandname']), 'frequencytol=' + repr(_pc.document['frequencytol']), 'project=' + repr(_pc.document['project']), 'starttime=' + repr(_pc.document['starttime']), 'stoptime=' + repr(_pc.document['stoptime']), 'applytsys=' + repr(_pc.document['applytsys']), 'autocorr=' + repr(_pc.document['autocorr']), 'antnamescheme=' + repr(_pc.document['antnamescheme']), 'keepblanks=' + repr(_pc.document['keepblanks']), 'evlabands=' + repr(_pc.document['evlabands']) ] )
124 task_result = None
125 try:
126 task_result = _importvla_t( _pc.document['archivefiles'], _pc.document['vis'], _pc.document['bandname'], _pc.document['frequencytol'], _pc.document['project'], _pc.document['starttime'], _pc.document['stoptime'], _pc.document['applytsys'], _pc.document['autocorr'], _pc.document['antnamescheme'], _pc.document['keepblanks'], _pc.document['evlabands'] )
127 except Exception as exc:
128 _except_log('importvla', exc)
129 raise
130 finally:
131 task_result = _end_log( _logging_state_, 'importvla', task_result )
132 return task_result
134importvla = _importvla( )