Coverage for /wheeldirectory/casa-6.7.0-11-py3.10.el8/lib/py/lib/python3.10/site-packages/casatools/__casac__/calanalysis.py: 41%
142 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, '_calanalysis')).lstrip('.')
13 try:
14 return importlib.import_module(mname)
15 except ImportError:
16 return importlib.import_module('_calanalysis')
17 _calanalysis = 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('_calanalysis', [dirname(__file__)])
26 except ImportError:
27 import _calanalysis
28 return _calanalysis
29 try:
30 _mod = imp.load_module('_calanalysis', fp, pathname, description)
31 finally:
32 if fp is not None:
33 fp.close()
34 return _mod
35 _calanalysis = swig_import_helper()
36 del swig_import_helper
37else:
38 import _calanalysis
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 calanalysis(_object):
99 """Proxy of C++ casac::calanalysis class."""
101 __swig_setmethods__ = {}
102 __setattr__ = lambda self, name, value: _swig_setattr(self, calanalysis, name, value)
103 __swig_getmethods__ = {}
104 __getattr__ = lambda self, name: _swig_getattr(self, calanalysis, name)
105 __repr__ = _swig_repr
107 def __init__(self):
108 """__init__(self) -> calanalysis"""
109 this = _calanalysis.new_calanalysis()
110 try:
111 self.this.append(this)
112 except __builtin__.Exception:
113 self.this = this
115 def open(self, *args, **kwargs):
116 """
117 open(self, _caltable) -> bool
121 Summary:
122 Open a calibration table.
124 Description:
127 This member function opens a calibration table.
129 Input Parameters:
130 caltable Python string containing the calibration table name.
132 Example:
134 ca.open( '<caltable name>' )
136 --------------------------------------------------------------------------------
138 """
139 return _calanalysis.calanalysis_open(self, *args, **kwargs)
142 def close(self):
143 """
144 close(self) -> bool
148 Summary:
149 Close a calibration table.
151 Description:
154 This member function closes a calibration table.
156 Example:
158 ca.close()
160 --------------------------------------------------------------------------------
162 """
163 return _calanalysis.calanalysis_close(self)
166 def calname(self):
167 """
168 calname(self) -> string
172 Summary:
173 Return the calibration table name.
175 Description:
178 This member function returns calibration table name.
180 Example:
182 caltable = ca.calname()
184 --------------------------------------------------------------------------------
186 """
187 return _calanalysis.calanalysis_calname(self)
190 def msname(self):
191 """
192 msname(self) -> string
196 Summary:
197 Return the name of the MS that created this calibration table.
199 Description:
202 This member function returns the name of the MS that created this calibration
203 table.
205 Example:
207 msname = ca.msname()
209 --------------------------------------------------------------------------------
211 """
212 return _calanalysis.calanalysis_msname(self)
215 def viscal(self):
216 """
217 viscal(self) -> string
221 Summary:
222 Return the type of calibration table ('B', 'G', 'T', etc.).
224 Description:
227 This member function returns the type of calibration table ('B', 'G', 'T',
228 etc.).
230 Example:
232 viscal = ca.viscal()
234 --------------------------------------------------------------------------------
236 """
237 return _calanalysis.calanalysis_viscal(self)
240 def partype(self):
241 """
242 partype(self) -> string
246 Summary:
247 Return the parameter column type in the calibration table ('Complex' or 'Float').
249 Description:
252 This member function returns the parameter column type in the calibration table
253 ('Complex' or 'Float').
255 Example:
257 partype = ca.partype()
259 --------------------------------------------------------------------------------
261 """
262 return _calanalysis.calanalysis_partype(self)
265 def polbasis(self):
266 """
267 polbasis(self) -> string
271 Summary:
272 Return the polarization basis in the calibration table ('L' for linear or 'C' for circular).
274 Description:
277 This member function returns the polarization basis in the calibration table
278 ('L' for linear or 'C' for circular).
280 Example:
282 polbasis = ca.polbasis()
284 --------------------------------------------------------------------------------
286 """
287 return _calanalysis.calanalysis_polbasis(self)
290 def numfield(self):
291 """
292 numfield(self) -> long
296 Summary:
297 Return the number of fields in the calibration table.
299 Description:
302 This member function returns the number of fields in the calibration table.
304 Example:
306 numfield = ca.numfield()
308 --------------------------------------------------------------------------------
310 """
311 return _calanalysis.calanalysis_numfield(self)
314 def field(self, *args, **kwargs):
315 """
316 field(self, _name) -> std::vector< std::string >
320 Summary:
321 Return the fields in the calibration table.
323 Description:
326 This member function returns the fields in the calibration table.
328 Input Parameters:
329 name The python boolean which determines whether field names (True) or field numbers (False) are returned.
331 Example:
333 field = ca.field()
335 --------------------------------------------------------------------------------
337 """
338 return _calanalysis.calanalysis_field(self, *args, **kwargs)
341 def numantenna(self):
342 """
343 numantenna(self) -> long
347 Summary:
348 Return the number of antennas in the calibration table.
350 Description:
353 This member function returns the number of antennas in the calibration table.
355 Example:
357 numantenna = ca.numantenna()
359 --------------------------------------------------------------------------------
361 """
362 return _calanalysis.calanalysis_numantenna(self)
365 def numantenna1(self):
366 """
367 numantenna1(self) -> long
371 Summary:
372 Return the number of antenna 1s in the calibration table.
374 Description:
377 This member function returns the number of antenna 1s in the calibration table.
379 Example:
381 numantenna1 = ca.numantenna1()
383 --------------------------------------------------------------------------------
385 """
386 return _calanalysis.calanalysis_numantenna1(self)
389 def numantenna2(self):
390 """
391 numantenna2(self) -> long
395 Summary:
396 Return the number of antenna 2s in the calibration table.
398 Description:
401 This member function returns the number of antenna 2s in the calibration table.
403 Example:
405 numantenna2 = ca.numantenna2()
407 --------------------------------------------------------------------------------
409 """
410 return _calanalysis.calanalysis_numantenna2(self)
413 def antenna(self, *args, **kwargs):
414 """
415 antenna(self, _name) -> std::vector< std::string >
419 Summary:
420 Return the antennas in the calibration table.
422 Description:
425 This member function returns the antennas in the calibration table.
427 Input Parameters:
428 name The python boolean which determines whether antenna names (True) or antenna numbers (False) are returned.
430 Example:
432 antenna = ca.antenna()
434 --------------------------------------------------------------------------------
436 """
437 return _calanalysis.calanalysis_antenna(self, *args, **kwargs)
440 def antenna1(self, *args, **kwargs):
441 """
442 antenna1(self, _name) -> std::vector< std::string >
446 Summary:
447 Return the antenna 1s in the calibration table.
449 Description:
452 This member function returns the antenna 1s in the calibration table.
454 Input Parameters:
455 name The python boolean which determines whether antenna 1 names (True) or antenna 1 numbers (False) are returned.
457 Example:
459 antenna1 = ca.antenna1()
461 --------------------------------------------------------------------------------
463 """
464 return _calanalysis.calanalysis_antenna1(self, *args, **kwargs)
467 def antenna2(self, *args, **kwargs):
468 """
469 antenna2(self, _name) -> std::vector< std::string >
473 Summary:
474 Return the antenna 2s in the calibration table.
476 Description:
479 This member function returns the antenna 2s in the calibration table.
481 Input Parameters:
482 name The python boolean which determines whether antenna 2 names (True) or antenna 2 numbers (False) are returned.
484 Example:
486 antenna2 = ca.antenna2()
488 --------------------------------------------------------------------------------
490 """
491 return _calanalysis.calanalysis_antenna2(self, *args, **kwargs)
494 def numfeed(self):
495 """
496 numfeed(self) -> long
500 Summary:
501 Return the number of feeds in the calibration table.
503 Description:
506 This member function returns the number of feeds in the calibration table.
508 Example:
510 numfeed = ca.numfeed()
512 --------------------------------------------------------------------------------
514 """
515 return _calanalysis.calanalysis_numfeed(self)
518 def feed(self):
519 """
520 feed(self) -> std::vector< std::string >
524 Summary:
525 Return the feeds in the calibration table.
527 Description:
530 This member function returns the feeds in the calibration table.
532 Example:
534 feed = ca.feed()
536 --------------------------------------------------------------------------------
538 """
539 return _calanalysis.calanalysis_feed(self)
542 def numtime(self):
543 """
544 numtime(self) -> long
548 Summary:
549 Return the number of times in the calibration table.
551 Description:
554 This member function returns the number of times in the calibration table.
556 Example:
558 numtime = ca.numtime()
560 --------------------------------------------------------------------------------
562 """
563 return _calanalysis.calanalysis_numtime(self)
566 def time(self):
567 """
568 time(self) -> std::vector< double >
572 Summary:
573 Return the times (in MJD seconds) in the calibration table.
575 Description:
578 This member function returns the times (in MJD seconds) in the calibration
579 table.
581 Example:
583 time = ca.time()
585 --------------------------------------------------------------------------------
587 """
588 return _calanalysis.calanalysis_time(self)
591 def numspw(self):
592 """
593 numspw(self) -> long
597 Summary:
598 Return the number of spectral windows in the calibration table.
600 Description:
603 This member function returns the number of spectral windows in the calibration
604 table.
606 Example:
608 numspw = ca.numspw()
610 --------------------------------------------------------------------------------
612 """
613 return _calanalysis.calanalysis_numspw(self)
616 def spw(self, *args, **kwargs):
617 """
618 spw(self, _name) -> std::vector< std::string >
622 Summary:
623 Return the spectral windows in the calibration table.
625 Description:
628 This member function returns the spectral windows in the calibration table.
630 Input Parameters:
631 name The python boolean which determines whether spectral window names (True) or spectral window numbers (False) are returned.
633 Example:
635 spw = ca.spw()
637 --------------------------------------------------------------------------------
639 """
640 return _calanalysis.calanalysis_spw(self, *args, **kwargs)
643 def numchannel(self):
644 """
645 numchannel(self) -> std::vector< long >
649 Summary:
650 Return the number of channels per spectral window in the calibration table.
652 Description:
655 This member function returns the number of channels per spectral window in the
656 calibration table.
658 Example:
660 numChannel = ca.numchannel()
662 --------------------------------------------------------------------------------
664 """
665 return _calanalysis.calanalysis_numchannel(self)
668 def freq(self):
669 """
670 freq(self) -> record *
674 Summary:
675 Return the frequencies per spectral window in the calibration table.
677 Description:
680 This member function returns the frequencies per spectral window in the
681 calibration table.
683 Example:
685 freq = ca.freq()
687 --------------------------------------------------------------------------------
689 """
690 return _calanalysis.calanalysis_freq(self)
693 def get(self, *args, **kwargs):
694 """
695 get(self, _field, _antenna, _timerange, _spw, _feed, _axis, _ap, _norm, _unwrap, _jumpmax) -> record *
699 Summary:
700 Return the calibration data.
702 Description:
705 This member function returns the calibration data.
707 Input Parameters:
708 field The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields).
709 antenna The python comma-delimited string or list of strings containing the antenna 1s and antenna 2s. The default is '' (all antenna 1s and antenna 2s).
710 timerange The python list of floats of length two containing the start and stop times (in MJD seconds). The default is [] (the minimum start time and the maximum stop time).
711 spw The python comma-delimited string containing the spectral window names and numbers along with their channel numbers. The default is '' (all spectral windows and channels).
712 feed The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds).
713 axis The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ').
714 ap The python string which determines whether complex gains are converted to amplitudes or phases. The allowed values are 'AMPLITUDE' and 'PHASE'. The default is '' ('AMPLITUDE'). This parameter is ignored when the 'gain' values in the calibration table are real.
715 norm The python boolean which determines whether the amplitudes are normalized along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='PHASE'.
716 unwrap The python boolean which determines whether the phases are unwrapped along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='AMPLITUDE'.
717 jumpmax The python float which determines the maximum phase jump near +/- PI before unwrapping is performed. E.g., jumpmax = 0.1. The default is 0.0. It is ignored if the 'gain' values in the calibration table are real or ap = 'AMPLITUDE'. If the non-iteration axis is frequency: 1) if jumpmax == 0.0, use fringe fitting (only available when the non-iteration axis is time); 2) if jumpmax != 0.0, use simple unwrapping (same algorithm as used when the non-iteration axis is time or frequency).
719 Example:
721 # All data limited only by the spectral window and channel input
722 data = ca.get( spw='0:4~15,1,2:10~20' )
724 --------------------------------------------------------------------------------
726 """
727 return _calanalysis.calanalysis_get(self, *args, **kwargs)
730 def fit(self, *args, **kwargs):
731 """
732 fit(self, _field, _antenna, _timerange, _spw, _feed, _axis, _ap, _norm, _unwrap, _jumpmax, _order, _type, _weight) -> record *
736 Summary:
737 Return the calibration data and fits along the non-iteration axis.
739 Description:
742 This member function returns the calibration data and fits along the
743 non-iteration axis.
745 Input Parameters:
746 field The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields).
747 antenna The python comma-delimited string or list of strings containing the antenna 1s and antenna 2s. The default is '' (all antenna 1s and antenna 2s).
748 timerange The python list of floats of length two containing the start and stop times (in MJD seconds). The default is [] (the minimum start time and the maximum stop time).
749 spw The python comma-delimited string containing the spectral window names and numbers along with their channel numbers. The default is '' (all spectral windows and channels).
750 feed The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds).
751 axis The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ').
752 ap The python string which determines whether complex gains are converted to amplitudes or phases. The allowed values are 'AMPLITUDE' and 'PHASE'. The default is '' ('AMPLITUDE'). This parameter is ignored when the 'gain' values in the calibration table are real.
753 norm The python boolean which determines whether the amplitudes are normalized along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='PHASE'.
754 unwrap The python boolean which determines whether the phases are unwrapped along each non-iteration axis. The default is False. This parameter is ignored when the 'gain' values in the calibration table are real or ap='AMPLITUDE'.
755 jumpmax The python float which determines the maximum phase jump near +/- PI before unwrapping is performed. E.g., jumpmax = 0.1. The default is 0.0. It is ignored if the 'gain' values in the calibration table are real or ap = 'AMPLITUDE'. If the non-iteration axis is frequency: 1) if jumpmax == 0.0, use fringe fitting (only available when the non-iteration axis is time); 2) if jumpmax != 0.0, use simple unwrapping (same algorithm as used when the non-iteration axis is time or frequency).
756 order The python string containing the fit order. The allowed values are 'AVERAGE', 'LINEAR', and 'QUADRATIC'. The default is '' ('AVERAGE'). NB: 'QUADRATIC' is not allowed when type = 'ROBUST'.
757 type The python string containing the fit type. The allowed values are 'LSQ' and 'ROBUST'. The default is '' ('LSQ'). NB: Robust fitting is experimental. It flags outliers.
758 weight The python boolean which determines the weighting. The default is False.
760 Example:
762 # All data limited only by the spectral window and channel input. The fit order
763 # is linear.
764 data_fit = ca.fit( spw='0:4~15,1,2:10~20', order='LINEAR' )
766 --------------------------------------------------------------------------------
768 """
769 return _calanalysis.calanalysis_fit(self, *args, **kwargs)
771 __swig_destroy__ = _calanalysis.delete_calanalysis
772 __del__ = lambda self: None
773calanalysis_swigregister = _calanalysis.calanalysis_swigregister
774calanalysis_swigregister(calanalysis)
776# This file is compatible with both classic and new-style classes.