Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/__init__.py: 89%
175 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###########################################################################
2########################## generated by setup.py ##########################
3###########################################################################
4from __future__ import absolute_import
5from casatools import logsink as _logsink
6import os as __os
7__cwd = __os.path.dirname(__os.path.abspath(__file__))
8__name__ = 'casatasks'
9__all__ = [ "casalog", "version", "version_string",
10 'imhead',
11 'immoments',
12 'imhistory',
13 'applycal',
14 'bandpass',
15 'blcal',
16 'calstat',
17 'defintent',
18 'concat',
19 'split',
20 'listobs',
21 'flagdata',
22 'flagcmd',
23 'getephemtable',
24 'setjy',
25 'cvel',
26 'cvel2',
27 'importuvfits',
28 'importfits',
29 'exportfits',
30 'exportuvfits',
31 'partition',
32 'listpartition',
33 'flagmanager',
34 'mstransform',
35 'msuvbin',
36 'tclean',
37 'deconvolve',
38 'immath',
39 'vishead',
40 'uvsub',
41 'spxfit',
42 'splattotable',
43 'specsmooth',
44 'specflux',
45 'smoothcal',
46 'specfit',
47 'imstat',
48 'slsearch',
49 'delmod',
50 'imsubimage',
51 'accor',
52 'asdmsummary',
53 'clearcal',
54 'conjugatevis',
55 'exportasdm',
56 'importasdm',
57 'clearstat',
58 'fixplanets',
59 'fixvis',
60 'phaseshift',
61 'fluxscale',
62 'ft',
63 'gaincal',
64 'gencal',
65 'getantposalma',
66 'testconcat',
67 'apparentsens',
68 'getcalmodvla',
69 'hanningsmooth',
70 'imcollapse',
71 'imcontsub',
72 'imdev',
73 'imfit',
74 'impbcor',
75 'importasap',
76 'importatca',
77 'importfitsidi',
78 'importgmrt',
79 'importnro',
80 'importvla',
81 'impv',
82 'imrebin',
83 'imreframe',
84 'imregrid',
85 'imsmooth',
86 'imtrans',
87 'imval',
88 'initweights',
89 'listcal',
90 'listfits',
91 'listhistory',
92 'listsdm',
93 'listvis',
94 'makemask',
95 'polcal',
96 'polfromgain',
97 'predictcomp',
98 'rerefant',
99 'rmfit',
100 'rmtables',
101 'sdatmcor',
102 'sdbaseline',
103 'sdcal',
104 'sdfit',
105 'sdfixscan',
106 'sdgaincal',
107 'sdimaging',
108 'sdsmooth',
109 'tsdimaging',
110 'nrobeamaverage',
111 'sdtimeaverage',
112 'simanalyze',
113 'simobserve',
114 'feather',
115 'simalma',
116 'statwt',
117 'virtualconcat',
118 'uvcontsub_old',
119 'uvcontsub',
120 'uvmodelfit',
121 'visstat',
122 'widebandpbcor',
123 'importmiriad',
124 'plotweather',
125 'plotants',
126 'fringefit',
127 'plotbandpass',
128 'sdintimaging',
129 'sdpolaverage',
130 'sdsidebandsplit',
131 'plotprofilemap',
132 'imbaseline',
133 'wvrgcal',
134 ]
136from casaconfig import config
137casalog = _logsink( config.logfile )
139from .imhead import imhead
140from .immoments import immoments
141from .imhistory import imhistory
142from .applycal import applycal
143from .bandpass import bandpass
144from .blcal import blcal
145from .calstat import calstat
146from .defintent import defintent
147from .concat import concat
148from .split import split
149from .listobs import listobs
150from .flagdata import flagdata
151from .flagcmd import flagcmd
152from .getephemtable import getephemtable
153from .setjy import setjy
154from .cvel import cvel
155from .cvel2 import cvel2
156from .importuvfits import importuvfits
157from .importfits import importfits
158from .exportfits import exportfits
159from .exportuvfits import exportuvfits
160from .partition import partition
161from .listpartition import listpartition
162from .flagmanager import flagmanager
163from .mstransform import mstransform
164from .msuvbin import msuvbin
165from .tclean import tclean
166from .deconvolve import deconvolve
167from .immath import immath
168from .vishead import vishead
169from .uvsub import uvsub
170from .spxfit import spxfit
171from .splattotable import splattotable
172from .specsmooth import specsmooth
173from .specflux import specflux
174from .smoothcal import smoothcal
175from .specfit import specfit
176from .imstat import imstat
177from .slsearch import slsearch
178from .delmod import delmod
179from .imsubimage import imsubimage
180from .accor import accor
181from .asdmsummary import asdmsummary
182from .clearcal import clearcal
183from .conjugatevis import conjugatevis
184from .exportasdm import exportasdm
185from .importasdm import importasdm
186from .clearstat import clearstat
187from .fixplanets import fixplanets
188from .fixvis import fixvis
189from .phaseshift import phaseshift
190from .fluxscale import fluxscale
191from .ft import ft
192from .gaincal import gaincal
193from .gencal import gencal
194from .getantposalma import getantposalma
195from .testconcat import testconcat
196from .apparentsens import apparentsens
197from .getcalmodvla import getcalmodvla
198from .hanningsmooth import hanningsmooth
199from .imcollapse import imcollapse
200from .imcontsub import imcontsub
201from .imdev import imdev
202from .imfit import imfit
203from .impbcor import impbcor
204from .importasap import importasap
205from .importatca import importatca
206from .importfitsidi import importfitsidi
207from .importgmrt import importgmrt
208from .importnro import importnro
209from .importvla import importvla
210from .impv import impv
211from .imrebin import imrebin
212from .imreframe import imreframe
213from .imregrid import imregrid
214from .imsmooth import imsmooth
215from .imtrans import imtrans
216from .imval import imval
217from .initweights import initweights
218from .listcal import listcal
219from .listfits import listfits
220from .listhistory import listhistory
221from .listsdm import listsdm
222from .listvis import listvis
223from .makemask import makemask
224from .polcal import polcal
225from .polfromgain import polfromgain
226from .predictcomp import predictcomp
227from .rerefant import rerefant
228from .rmfit import rmfit
229from .rmtables import rmtables
230from .sdatmcor import sdatmcor
231from .sdbaseline import sdbaseline
232from .sdcal import sdcal
233from .sdfit import sdfit
234from .sdfixscan import sdfixscan
235from .sdgaincal import sdgaincal
236from .sdimaging import sdimaging
237from .sdsmooth import sdsmooth
238from .tsdimaging import tsdimaging
239from .nrobeamaverage import nrobeamaverage
240from .sdtimeaverage import sdtimeaverage
241from .simanalyze import simanalyze
242from .simobserve import simobserve
243from .feather import feather
244from .simalma import simalma
245from .statwt import statwt
246from .virtualconcat import virtualconcat
247from .uvcontsub_old import uvcontsub_old
248from .uvcontsub import uvcontsub
249from .uvmodelfit import uvmodelfit
250from .visstat import visstat
251from .widebandpbcor import widebandpbcor
252from .importmiriad import importmiriad
253from .plotweather import plotweather
254from .plotants import plotants
255from .fringefit import fringefit
256from .plotbandpass import plotbandpass
257from .sdintimaging import sdintimaging
258from .sdpolaverage import sdpolaverage
259from .sdsidebandsplit import sdsidebandsplit
260from .plotprofilemap import plotprofilemap
261from .imbaseline import imbaseline
262from .wvrgcal import wvrgcal
264def version( ): return [ 6, 7, 0, 12 ]
265def version_string( ): return "6.7.0.12"
266casalog.setglobal(True)
268def xml_interface_defs( ): return { 'imhead': __os.path.join(__cwd,'__xml__/imhead.xml'), 'immoments': __os.path.join(__cwd,'__xml__/immoments.xml'), 'imhistory': __os.path.join(__cwd,'__xml__/imhistory.xml'), 'applycal': __os.path.join(__cwd,'__xml__/applycal.xml'), 'bandpass': __os.path.join(__cwd,'__xml__/bandpass.xml'), 'blcal': __os.path.join(__cwd,'__xml__/blcal.xml'), 'calstat': __os.path.join(__cwd,'__xml__/calstat.xml'), 'defintent': __os.path.join(__cwd,'__xml__/defintent.xml'), 'concat': __os.path.join(__cwd,'__xml__/concat.xml'), 'split': __os.path.join(__cwd,'__xml__/split.xml'), 'listobs': __os.path.join(__cwd,'__xml__/listobs.xml'), 'flagdata': __os.path.join(__cwd,'__xml__/flagdata.xml'), 'flagcmd': __os.path.join(__cwd,'__xml__/flagcmd.xml'), 'getephemtable': __os.path.join(__cwd,'__xml__/getephemtable.xml'), 'setjy': __os.path.join(__cwd,'__xml__/setjy.xml'), 'cvel': __os.path.join(__cwd,'__xml__/cvel.xml'), 'cvel2': __os.path.join(__cwd,'__xml__/cvel2.xml'), 'importuvfits': __os.path.join(__cwd,'__xml__/importuvfits.xml'), 'importfits': __os.path.join(__cwd,'__xml__/importfits.xml'), 'exportfits': __os.path.join(__cwd,'__xml__/exportfits.xml'), 'exportuvfits': __os.path.join(__cwd,'__xml__/exportuvfits.xml'), 'partition': __os.path.join(__cwd,'__xml__/partition.xml'), 'listpartition': __os.path.join(__cwd,'__xml__/listpartition.xml'), 'flagmanager': __os.path.join(__cwd,'__xml__/flagmanager.xml'), 'mstransform': __os.path.join(__cwd,'__xml__/mstransform.xml'), 'msuvbin': __os.path.join(__cwd,'__xml__/msuvbin.xml'), 'tclean': __os.path.join(__cwd,'__xml__/tclean.xml'), 'deconvolve': __os.path.join(__cwd,'__xml__/deconvolve.xml'), 'immath': __os.path.join(__cwd,'__xml__/immath.xml'), 'vishead': __os.path.join(__cwd,'__xml__/vishead.xml'), 'uvsub': __os.path.join(__cwd,'__xml__/uvsub.xml'), 'spxfit': __os.path.join(__cwd,'__xml__/spxfit.xml'), 'splattotable': __os.path.join(__cwd,'__xml__/splattotable.xml'), 'specsmooth': __os.path.join(__cwd,'__xml__/specsmooth.xml'), 'specflux': __os.path.join(__cwd,'__xml__/specflux.xml'), 'smoothcal': __os.path.join(__cwd,'__xml__/smoothcal.xml'), 'specfit': __os.path.join(__cwd,'__xml__/specfit.xml'), 'imstat': __os.path.join(__cwd,'__xml__/imstat.xml'), 'slsearch': __os.path.join(__cwd,'__xml__/slsearch.xml'), 'delmod': __os.path.join(__cwd,'__xml__/delmod.xml'), 'imsubimage': __os.path.join(__cwd,'__xml__/imsubimage.xml'), 'accor': __os.path.join(__cwd,'__xml__/accor.xml'), 'asdmsummary': __os.path.join(__cwd,'__xml__/asdmsummary.xml'), 'clearcal': __os.path.join(__cwd,'__xml__/clearcal.xml'), 'conjugatevis': __os.path.join(__cwd,'__xml__/conjugatevis.xml'), 'exportasdm': __os.path.join(__cwd,'__xml__/exportasdm.xml'), 'importasdm': __os.path.join(__cwd,'__xml__/importasdm.xml'), 'clearstat': __os.path.join(__cwd,'__xml__/clearstat.xml'), 'fixplanets': __os.path.join(__cwd,'__xml__/fixplanets.xml'), 'fixvis': __os.path.join(__cwd,'__xml__/fixvis.xml'), 'phaseshift': __os.path.join(__cwd,'__xml__/phaseshift.xml'), 'fluxscale': __os.path.join(__cwd,'__xml__/fluxscale.xml'), 'ft': __os.path.join(__cwd,'__xml__/ft.xml'), 'gaincal': __os.path.join(__cwd,'__xml__/gaincal.xml'), 'gencal': __os.path.join(__cwd,'__xml__/gencal.xml'), 'getantposalma': __os.path.join(__cwd,'__xml__/getantposalma.xml'), 'testconcat': __os.path.join(__cwd,'__xml__/testconcat.xml'), 'apparentsens': __os.path.join(__cwd,'__xml__/apparentsens.xml'), 'getcalmodvla': __os.path.join(__cwd,'__xml__/getcalmodvla.xml'), 'hanningsmooth': __os.path.join(__cwd,'__xml__/hanningsmooth.xml'), 'imcollapse': __os.path.join(__cwd,'__xml__/imcollapse.xml'), 'imcontsub': __os.path.join(__cwd,'__xml__/imcontsub.xml'), 'imdev': __os.path.join(__cwd,'__xml__/imdev.xml'), 'imfit': __os.path.join(__cwd,'__xml__/imfit.xml'), 'impbcor': __os.path.join(__cwd,'__xml__/impbcor.xml'), 'importasap': __os.path.join(__cwd,'__xml__/importasap.xml'), 'importatca': __os.path.join(__cwd,'__xml__/importatca.xml'), 'importfitsidi': __os.path.join(__cwd,'__xml__/importfitsidi.xml'), 'importgmrt': __os.path.join(__cwd,'__xml__/importgmrt.xml'), 'importnro': __os.path.join(__cwd,'__xml__/importnro.xml'), 'importvla': __os.path.join(__cwd,'__xml__/importvla.xml'), 'impv': __os.path.join(__cwd,'__xml__/impv.xml'), 'imrebin': __os.path.join(__cwd,'__xml__/imrebin.xml'), 'imreframe': __os.path.join(__cwd,'__xml__/imreframe.xml'), 'imregrid': __os.path.join(__cwd,'__xml__/imregrid.xml'), 'imsmooth': __os.path.join(__cwd,'__xml__/imsmooth.xml'), 'imtrans': __os.path.join(__cwd,'__xml__/imtrans.xml'), 'imval': __os.path.join(__cwd,'__xml__/imval.xml'), 'initweights': __os.path.join(__cwd,'__xml__/initweights.xml'), 'listcal': __os.path.join(__cwd,'__xml__/listcal.xml'), 'listfits': __os.path.join(__cwd,'__xml__/listfits.xml'), 'listhistory': __os.path.join(__cwd,'__xml__/listhistory.xml'), 'listsdm': __os.path.join(__cwd,'__xml__/listsdm.xml'), 'listvis': __os.path.join(__cwd,'__xml__/listvis.xml'), 'makemask': __os.path.join(__cwd,'__xml__/makemask.xml'), 'polcal': __os.path.join(__cwd,'__xml__/polcal.xml'), 'polfromgain': __os.path.join(__cwd,'__xml__/polfromgain.xml'), 'predictcomp': __os.path.join(__cwd,'__xml__/predictcomp.xml'), 'rerefant': __os.path.join(__cwd,'__xml__/rerefant.xml'), 'rmfit': __os.path.join(__cwd,'__xml__/rmfit.xml'), 'rmtables': __os.path.join(__cwd,'__xml__/rmtables.xml'), 'sdatmcor': __os.path.join(__cwd,'__xml__/sdatmcor.xml'), 'sdbaseline': __os.path.join(__cwd,'__xml__/sdbaseline.xml'), 'sdcal': __os.path.join(__cwd,'__xml__/sdcal.xml'), 'sdfit': __os.path.join(__cwd,'__xml__/sdfit.xml'), 'sdfixscan': __os.path.join(__cwd,'__xml__/sdfixscan.xml'), 'sdgaincal': __os.path.join(__cwd,'__xml__/sdgaincal.xml'), 'sdimaging': __os.path.join(__cwd,'__xml__/sdimaging.xml'), 'sdsmooth': __os.path.join(__cwd,'__xml__/sdsmooth.xml'), 'tsdimaging': __os.path.join(__cwd,'__xml__/tsdimaging.xml'), 'nrobeamaverage': __os.path.join(__cwd,'__xml__/nrobeamaverage.xml'), 'sdtimeaverage': __os.path.join(__cwd,'__xml__/sdtimeaverage.xml'), 'simanalyze': __os.path.join(__cwd,'__xml__/simalma.xml'), 'simobserve': __os.path.join(__cwd,'__xml__/simobserve.xml'), 'feather': __os.path.join(__cwd,'__xml__/simanalyze.xml'), 'simalma': __os.path.join(__cwd,'__xml__/feather.xml'), 'statwt': __os.path.join(__cwd,'__xml__/statwt.xml'), 'virtualconcat': __os.path.join(__cwd,'__xml__/virtualconcat.xml'), 'uvcontsub_old': __os.path.join(__cwd,'__xml__/uvcontsub_old.xml'), 'uvcontsub': __os.path.join(__cwd,'__xml__/uvcontsub.xml'), 'uvmodelfit': __os.path.join(__cwd,'__xml__/uvmodelfit.xml'), 'visstat': __os.path.join(__cwd,'__xml__/visstat.xml'), 'widebandpbcor': __os.path.join(__cwd,'__xml__/widebandpbcor.xml'), 'importmiriad': __os.path.join(__cwd,'__xml__/importmiriad.xml'), 'plotweather': __os.path.join(__cwd,'__xml__/plotweather.xml'), 'plotants': __os.path.join(__cwd,'__xml__/plotants.xml'), 'fringefit': __os.path.join(__cwd,'__xml__/fringefit.xml'), 'plotbandpass': __os.path.join(__cwd,'__xml__/plotbandpass.xml'), 'sdintimaging': __os.path.join(__cwd,'__xml__/sdintimaging.xml'), 'sdpolaverage': __os.path.join(__cwd,'__xml__/sdpolaverage.xml'), 'sdsidebandsplit': __os.path.join(__cwd,'__xml__/sdsidebandsplit.xml'), 'plotprofilemap': __os.path.join(__cwd,'__xml__/plotprofilemap.xml'), 'imbaseline': __os.path.join(__cwd,'__xml__/imbaseline.xml'), 'wvrgcal': __os.path.join(__cwd,'__xml__/wvrgcal.xml') }
270mpi_env_found=False
271try:
272 from casampi.MPIEnvironment import MPIEnvironment
273 mpi_env_found=True
274except:
275 mpi_env_found=False
276# When in MPI mode, this will put servers into their serve() loop.
277# From this point on user scripts can use tclean parallelization, Tier0 parallelization,
278# and MMS-parallel tasks
279try:
280 import importlib
281 _clith_spec = importlib.util.find_spec('casalith')
282 # Defer to later if in casalith
283 if _clith_spec is None:
284 import casampi.private.start_mpi
285except ImportError:
286 pass
287package_variant='modular'
288try:
289 if _clith_spec is not None:
290 package_variant='casalith'
291except:
292 pass
293try:
294 _pipe_spec = importlib.util.find_spec('pipeline')
295 if _pipe_spec is not None:
296 package_variant='pipeline'
297except:
298 pass
299import platform
300if mpi_env_found and MPIEnvironment.is_mpi_enabled:
301 if MPIEnvironment.is_mpi_client:
302 try:
303 casalog.post("Python version " + platform.python_version())
304 casalog.post("CASA Version " + package_variant.upper() + " 6.7.0.12")
305 casalog.post("MPI Enabled")
306 except:
307 print("Error: the logfile is not writable")
308else:
309 try:
310 casalog.post("Python version " + platform.python_version())
311 casalog.post("CASA Version " + package_variant.upper() + " 6.7.0.12")
312 except:
313 print("Error: the logfile is not writable")