Coverage for /wheeldirectory/casa-6.7.0-11-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/synthesisimager.py: 41%
150 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-23 15:54 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-23 15:54 +0000
1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 3.0.12
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
7from sys import version_info as _swig_python_version_info
8if _swig_python_version_info >= (2, 7, 0):
9 def swig_import_helper():
10 import importlib
11 pkg = __name__.rpartition('.')[0]
12 mname = '.'.join((pkg, '_synthesisimager')).lstrip('.')
13 try:
14 return importlib.import_module(mname)
15 except ImportError:
16 return importlib.import_module('_synthesisimager')
17 _synthesisimager = swig_import_helper()
18 del swig_import_helper
19elif _swig_python_version_info >= (2, 6, 0):
20 def swig_import_helper():
21 from os.path import dirname
22 import imp
23 fp = None
24 try:
25 fp, pathname, description = imp.find_module('_synthesisimager', [dirname(__file__)])
26 except ImportError:
27 import _synthesisimager
28 return _synthesisimager
29 try:
30 _mod = imp.load_module('_synthesisimager', fp, pathname, description)
31 finally:
32 if fp is not None:
33 fp.close()
34 return _mod
35 _synthesisimager = swig_import_helper()
36 del swig_import_helper
37else:
38 import _synthesisimager
39del _swig_python_version_info
41try:
42 _swig_property = property
43except NameError:
44 pass # Python < 2.2 doesn't have 'property'.
46try:
47 import builtins as __builtin__
48except ImportError:
49 import __builtin__
51def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
52 if (name == "thisown"):
53 return self.this.own(value)
54 if (name == "this"):
55 if type(value).__name__ == 'SwigPyObject':
56 self.__dict__[name] = value
57 return
58 method = class_type.__swig_setmethods__.get(name, None)
59 if method:
60 return method(self, value)
61 if (not static):
62 if _newclass:
63 object.__setattr__(self, name, value)
64 else:
65 self.__dict__[name] = value
66 else:
67 raise AttributeError("You cannot add attributes to %s" % self)
70def _swig_setattr(self, class_type, name, value):
71 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
74def _swig_getattr(self, class_type, name):
75 if (name == "thisown"):
76 return self.this.own()
77 method = class_type.__swig_getmethods__.get(name, None)
78 if method:
79 return method(self)
80 raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
83def _swig_repr(self):
84 try:
85 strthis = "proxy of " + self.this.__repr__()
86 except __builtin__.Exception:
87 strthis = ""
88 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
90try:
91 _object = object
92 _newclass = 1
93except __builtin__.Exception:
94 class _object:
95 pass
96 _newclass = 0
98class synthesisimager(_object):
99 """Proxy of C++ casac::synthesisimager class."""
101 __swig_setmethods__ = {}
102 __setattr__ = lambda self, name, value: _swig_setattr(self, synthesisimager, name, value)
103 __swig_getmethods__ = {}
104 __getattr__ = lambda self, name: _swig_getattr(self, synthesisimager, name)
105 __repr__ = _swig_repr
107 def __init__(self):
108 """__init__(self) -> synthesisimager"""
109 this = _synthesisimager.new_synthesisimager()
110 try:
111 self.this.append(this)
112 except __builtin__.Exception:
113 self.this = this
115 def selectdata(self, *args, **kwargs):
116 """
117 selectdata(self, _selpars) -> bool
121 Summary:
122 Select data from one MS
124 Input Parameters:
125 selpars All parameters that control selection within one MS
127 --------------------------------------------------------------------------------
129 """
130 return _synthesisimager.synthesisimager_selectdata(self, *args, **kwargs)
133 def tuneselectdata(self):
134 """
135 tuneselectdata(self) -> record *
139 Summary:
140 reselect the data to match image definition
142 --------------------------------------------------------------------------------
144 """
145 return _synthesisimager.synthesisimager_tuneselectdata(self)
148 def defineimage(self, *args, **kwargs):
149 """
150 defineimage(self, _impars, _gridpars) -> bool
154 Summary:
155 Define image coordinate systems FTMs
157 Input Parameters:
158 impars All parameters that control image coordinate system definition
159 gridpars All parameters that control ftmachines and gridding parameters
161 --------------------------------------------------------------------------------
163 """
164 return _synthesisimager.synthesisimager_defineimage(self, *args, **kwargs)
167 def normalizerinfo(self, *args, **kwargs):
168 """
169 normalizerinfo(self, _normpars) -> bool
173 Summary:
174 pass normalizer info for C++ normalization in lieu of python based normalization
176 Input Parameters:
177 normpars Normalization parameters in a record
179 --------------------------------------------------------------------------------
181 """
182 return _synthesisimager.synthesisimager_normalizerinfo(self, *args, **kwargs)
185 def setdata(self, *args, **kwargs):
186 """
187 setdata(self, _msname, _spw, _freqbeg, _freqend, _freqframe, _field, _antenna, _timestr, _scan, _obs, _state, _uvdist, _taql, _usescratch, _readonly, _incrmodel) -> bool
191 Summary:
192 Select data from one MS via conventional parameters (in lieu of selectdata)
194 Description:
197 Select data from one MS. Call this function in succession if there are
198 multiple MSs.
200 Input Parameters:
201 msname Name of one measurement set
202 spw Spectral Window / Channel / Frequency selection
203 freqbeg Starting frequency/velocity/channel as a string with units. If spw is also supplied, the intersection will be used
204 freqend End frequency/velocity/channel as a string with units.
205 freqframe Frequency frame in which freqbeg and freqend are specified.
206 field Field selection
207 antenna Antenna / Baseline selection
208 timestr Time range selection
209 scan Scan selection
210 obs Observation id selection
211 state Scan Intent or State selection
212 uvdist UV range selection
213 taql Generic taql selection
214 usescratch Use scratch column (True) or virtual records (False) for model data
215 readonly Open the MS in readonly mode. No model data will be written.
216 incrmodel Subtract existing model data and start with residuals
218 --------------------------------------------------------------------------------
220 """
221 return _synthesisimager.synthesisimager_setdata(self, *args, **kwargs)
224 def setimage(self, *args, **kwargs):
225 """
226 setimage(self, _imagename, _nx, _ny, _cellx, _celly, _stokes, _phasecenter, _nchan, _freqstart, _freqstep, _restfreq, _facets, _ftmachine, _ntaylorterms, _reffreq, _projection, _distance, _freqframe, _tracksource, _trackdir, _overwrite, _padding, _useautocorr, _usedoubleprec, _wprojplanes, _convfunc, _startmodel, _aterm, _psterm, _mterm, _wbawp, _cfcache, _usepointing, _pointingoffsetsigdev, _dopbcorr, _conjbeams, _computepastep, _rotatepastep) -> bool
230 Summary:
231 Define the image coordinate systems and types via conventinal parameters in lieu of defineimage
233 Description:
236 Define the image coordinate systems and shapes.
238 Input Parameters:
239 imagename Base image name
240 nx Total number of spatial pixels in x
241 ny Total number of spatial pixels in y
242 cellx Cellsize in x (e.g. '1arcsec')
243 celly Cellsize in y (e.g. '1arcsec')
244 stokes Stokes parameters to image (e.g. 'IQUV')
245 phasecenter Direction of phase center as a diretion measure or a field id
246 nchan Number of channels; a -1 (default) means all the channels as selected in selectvis and combined into one continuum channel
247 freqstart Start channel; A 0-relative channel number of the spwid or a frequency quantity or a velocity quantity or radial velocity measure
248 freqstep Step in channel; integer for number of channels or frequency quantity or velocity quantity or radial velocity measure
249 restfreq rest frequency to use; default => use the one available in ms
250 facets Number of facets on each axis
251 ftmachine FT-Machine type
252 ntaylorterms Number of terms for a spectral Taylor expansion
253 reffreq Reference Frequency of the image. Also used in the Taylor expansion.
254 projection Image coordinate system projection
255 distance Distance to object: usually ignore this! (m)
256 freqframe Frequency frame in which freqstart and freqstep are specified.
257 tracksource Track a source.
258 trackdir Name of moving source, e.g planet or moon, to keep fixed in image
259 overwrite Overwrite the image if it exists (true)
260 padding FFT padding
261 useautocorr Use auto correlations
262 usedoubleprec Double Precision gridding or not
263 wprojplanes Number of w-projection planes
264 convfunc Name of convolution function
265 startmodel Starting model ( image name or component list name )
266 aterm Set the antenna aperture tmer (aterm) on/off
267 psterm Set the Prolate Spheroidal term (psterm) on/off
268 mterm Set the mosaic term (mterm) on/off
269 wbawp Set usage of the wide-band A-Projection algorithm
270 cfcache Name of convolution function disk cache
271 usepointing Control application of the pointing correction
272 pointingoffsetsigdev Control application of the pointing correction for heterogenous array allowing for antenna pointing group identification using this parameter. The parameter has a significant cost on the memory used for gridding. Please utilize it wisely.
273 dopbcorr Control normalization of the raw image by the model PB
274 conjbeams Set conjbeams on/off
275 computepastep Increment in PA after which re-computation of the GCFs is triggered. 360.0 implies compute GCFs for only the first PA value encountered in the MS.
276 rotatepastep Increment in PA after which trigger in-memory rotation of the GCF nearest to the current PA value in the CF cache.
278 --------------------------------------------------------------------------------
280 """
281 return _synthesisimager.synthesisimager_setimage(self, *args, **kwargs)
284 def setweighting(self, *args, **kwargs):
285 """
286 setweighting(self, _type, _rmode, _noise, _robust, _fieldofview, _npixels, _multifield, _usecubebriggs, _uvtaper) -> bool
290 Summary:
291 Set parameters to control weighting during imaging
293 Input Parameters:
294 type Data weighting scheme
295 rmode rmode
296 noise Noise level
297 robust Robustness weighting factor
298 fieldofview Field of view
299 npixels NPixels
300 multifield Multifield
301 usecubebriggs Use per channel weight density calculation for Briggs style weighting
302 uvtaper Parameters of uv-taper Gaussian
304 --------------------------------------------------------------------------------
306 """
307 return _synthesisimager.synthesisimager_setweighting(self, *args, **kwargs)
310 def makepsf(self):
311 """
312 makepsf(self) -> bool
316 Summary:
317 Make the psf
319 --------------------------------------------------------------------------------
321 """
322 return _synthesisimager.synthesisimager_makepsf(self)
325 def apparentsens(self):
326 """
327 apparentsens(self) -> record *
331 Summary:
332 Calculate apparent aggregate sensitivity in the selected visibilities
334 --------------------------------------------------------------------------------
336 """
337 return _synthesisimager.synthesisimager_apparentsens(self)
340 def predictmodel(self):
341 """
342 predictmodel(self) -> bool
346 Summary:
347 Predict model visibilities.
349 --------------------------------------------------------------------------------
351 """
352 return _synthesisimager.synthesisimager_predictmodel(self)
355 def drygridding(self, *args, **kwargs):
356 """
357 drygridding(self, _cflist) -> bool
361 Summary:
362 Run a dry gridding run.
364 Description:
369 Input Parameters:
370 cflist List of CFs
372 --------------------------------------------------------------------------------
374 """
375 return _synthesisimager.synthesisimager_drygridding(self, *args, **kwargs)
378 def fillcfcache(self, *args, **kwargs):
379 """
380 fillcfcache(self, _cflist, _ftmname, _cfcpath, _pstermon, _atermon, _conjbeams) -> bool
384 Summary:
385 Fill a potentially blank CFCache held inside the AWProject-class FTMachines.
387 Description:
392 Input Parameters:
393 cflist List of CFs
394 ftmname Name of the FTMachine used
395 cfcpath Path to the CFCache on the disk
396 pstermon Is the PS-term ON?
397 atermon Is the A-term ON?
398 conjbeams Use WB A-Projection algorithm (use frequency-conjugate beams)?
400 --------------------------------------------------------------------------------
402 """
403 return _synthesisimager.synthesisimager_fillcfcache(self, *args, **kwargs)
406 def reloadcfcache(self):
407 """
408 reloadcfcache(self) -> bool
412 Summary:
413 Re-load the CFCache, the name of which should already be set in the tool.
415 Description:
420 --------------------------------------------------------------------------------
422 """
423 return _synthesisimager.synthesisimager_reloadcfcache(self)
426 def executemajorcycle(self, *args, **kwargs):
427 """
428 executemajorcycle(self, _controls) -> bool
432 Summary:
433 Run a major cycle
435 Input Parameters:
436 controls All parameters that control major cycle
438 --------------------------------------------------------------------------------
440 """
441 return _synthesisimager.synthesisimager_executemajorcycle(self, *args, **kwargs)
444 def makepb(self):
445 """
446 makepb(self) -> bool
450 Summary:
451 Make the primary beam
453 --------------------------------------------------------------------------------
455 """
456 return _synthesisimager.synthesisimager_makepb(self)
459 def makesdimage(self):
460 """
461 makesdimage(self) -> bool
465 Summary:
466 Make the single-dish image
468 --------------------------------------------------------------------------------
470 """
471 return _synthesisimager.synthesisimager_makesdimage(self)
474 def makesdpsf(self):
475 """
476 makesdpsf(self) -> bool
480 Summary:
481 Make the single-dish PSF
483 --------------------------------------------------------------------------------
485 """
486 return _synthesisimager.synthesisimager_makesdpsf(self)
489 def makeimage(self, *args, **kwargs):
490 """
491 makeimage(self, _type, _image, _compleximage, _model) -> bool
495 Summary:
496 calculate images of different type by gridding
498 Description:
501 This tool function actually does gridding (and Fourier inversion if
502 needed) of visibility data to make an image. It allows calculation of
503 various types of image:
504 begin{description}
505 item[observed] Make the dirty image from the DATA column ({em default})
506 item[model] Make the dirty image from the MODEL_DATA column
507 item[corrected] Make the dirty image from the CORRECTED_DATA column
508 item[residual] Make the dirty image from the difference of the
509 CORRECTED_DATA and MODEL_DATA columns
510 item[psf] Make the point spread function
511 item[singledish] Make a single dish image
512 item[coverage] Make a single dish or mosaic coverage image
513 item[holography] Make a complex holography image (experimental)
515 end{description}
517 Input Parameters:
518 type Type of output image
519 image Name of output image
520 compleximage Name of output complex image
521 model In case of multifield which image
523 --------------------------------------------------------------------------------
525 """
526 return _synthesisimager.synthesisimager_makeimage(self, *args, **kwargs)
529 def unlockimages(self, *args, **kwargs):
530 """
531 unlockimages(self, _imagefieldid) -> bool
535 Summary:
536 release some images attached to this process
538 Description:
541 Try to unlock images if the need arise
543 Input Parameters:
544 imagefieldid which image or outlier to unlock
546 --------------------------------------------------------------------------------
548 """
549 return _synthesisimager.synthesisimager_unlockimages(self, *args, **kwargs)
552 def estimatememory(self):
553 """
554 estimatememory(self) -> variant *
558 Summary:
559 Get an estimate in kilobytes of memory that will be needed
561 Description:
564 This function returns an estimate of the memory (RAM) to be used by sythesisimager tool. Need to be run after functions setdata and defineimage are done
566 --------------------------------------------------------------------------------
568 """
569 return _synthesisimager.synthesisimager_estimatememory(self)
572 def getimstore(self, *args, **kwargs):
573 """
574 getimstore(self, _id) -> casac::synthesisimstore *
578 Summary:
579 Get Image Store
581 Input Parameters:
582 id Image field id
584 --------------------------------------------------------------------------------
586 """
587 return _synthesisimager.synthesisimager_getimstore(self, *args, **kwargs)
590 def getImageName(self, *args, **kwargs):
591 """
592 getImageName(self, _facetId, _imageId, _taylorTerm) -> string
596 Summary:
597 Get Image Name
599 Description:
602 Get the image name for the given type of image (eg 'PB'), the facet index, and the taylor term.
605 Input Parameters:
606 facetId Facet index
607 imageId Image identifer (eg 'PSF')
608 taylorTerm Taylor term. Only needed for mfs deconvolvers.
610 --------------------------------------------------------------------------------
612 """
613 return _synthesisimager.synthesisimager_getImageName(self, *args, **kwargs)
616 def getcsys(self):
617 """
618 getcsys(self) -> record *
622 Summary:
623 get internally stored coordsys record
625 --------------------------------------------------------------------------------
627 """
628 return _synthesisimager.synthesisimager_getcsys(self)
631 def updatenchan(self):
632 """
633 updatenchan(self) -> long
637 Summary:
638 get internally stored updated nchan
640 --------------------------------------------------------------------------------
642 """
643 return _synthesisimager.synthesisimager_updatenchan(self)
646 def getweightdensity(self):
647 """
648 getweightdensity(self) -> string
652 Summary:
653 Save natural gridded wt to disk.
655 --------------------------------------------------------------------------------
657 """
658 return _synthesisimager.synthesisimager_getweightdensity(self)
661 def setweightdensity(self, *args, **kwargs):
662 """
663 setweightdensity(self, _type) -> bool
667 Summary:
668 Load the gridded weight density into image weighting generation
670 Description:
673 Load the gridded weight density into image weighting; useful in parallel when weight density is combined into one image and loaded in each process. if no imagename is passed the imagename.weight is loaded
676 Input Parameters:
677 type name of image holding combined weight density
679 --------------------------------------------------------------------------------
681 """
682 return _synthesisimager.synthesisimager_setweightdensity(self, *args, **kwargs)
685 def initmpi(self):
686 """
687 initmpi(self) -> bool
691 Summary:
692 init c++ based mpi
694 --------------------------------------------------------------------------------
696 """
697 return _synthesisimager.synthesisimager_initmpi(self)
700 def releasempi(self):
701 """
702 releasempi(self) -> bool
706 Summary:
707 release c++ based mpi back to python
709 --------------------------------------------------------------------------------
711 """
712 return _synthesisimager.synthesisimager_releasempi(self)
715 def done(self):
716 """
717 done(self) -> bool
721 Summary:
722 Close the tool
724 --------------------------------------------------------------------------------
726 """
727 return _synthesisimager.synthesisimager_done(self)
729 __swig_destroy__ = _synthesisimager.delete_synthesisimager
730 __del__ = lambda self: None
731synthesisimager_swigregister = _synthesisimager.synthesisimager_swigregister
732synthesisimager_swigregister(synthesisimager)
734# This file is compatible with both classic and new-style classes.