casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
calanalysis.py
Go to the documentation of this file.
00001 # This file was automatically generated by SWIG (http://www.swig.org).
00002 # Version 2.0.5
00003 #
00004 # Do not make changes to this file unless you know what you are doing--modify
00005 # the SWIG interface file instead.
00006 
00007 
00008 
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011     def swig_import_helper():
00012         from os.path import dirname
00013         import imp
00014         fp = None
00015         try:
00016             fp, pathname, description = imp.find_module('_calanalysis', [dirname(__file__)])
00017         except ImportError:
00018             import _calanalysis
00019             return _calanalysis
00020         if fp is not None:
00021             try:
00022                 _mod = imp.load_module('_calanalysis', fp, pathname, description)
00023             finally:
00024                 fp.close()
00025             return _mod
00026     _calanalysis = swig_import_helper()
00027     del swig_import_helper
00028 else:
00029     import _calanalysis
00030 del version_info
00031 try:
00032     _swig_property = property
00033 except NameError:
00034     pass # Python < 2.2 doesn't have 'property'.
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036     if (name == "thisown"): return self.this.own(value)
00037     if (name == "this"):
00038         if type(value).__name__ == 'SwigPyObject':
00039             self.__dict__[name] = value
00040             return
00041     method = class_type.__swig_setmethods__.get(name,None)
00042     if method: return method(self,value)
00043     if (not static):
00044         self.__dict__[name] = value
00045     else:
00046         raise AttributeError("You cannot add attributes to %s" % self)
00047 
00048 def _swig_setattr(self,class_type,name,value):
00049     return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050 
00051 def _swig_getattr(self,class_type,name):
00052     if (name == "thisown"): return self.this.own()
00053     method = class_type.__swig_getmethods__.get(name,None)
00054     if method: return method(self)
00055     raise AttributeError(name)
00056 
00057 def _swig_repr(self):
00058     try: strthis = "proxy of " + self.this.__repr__()
00059     except: strthis = ""
00060     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061 
00062 try:
00063     _object = object
00064     _newclass = 1
00065 except AttributeError:
00066     class _object : pass
00067     _newclass = 0
00068 
00069 
00070 class calanalysis(_object):
00071     """Proxy of C++ casac::calanalysis class"""
00072     __swig_setmethods__ = {}
00073     __setattr__ = lambda self, name, value: _swig_setattr(self, calanalysis, name, value)
00074     __swig_getmethods__ = {}
00075     __getattr__ = lambda self, name: _swig_getattr(self, calanalysis, name)
00076     __repr__ = _swig_repr
00077     def __init__(self): 
00078         """__init__(self) -> calanalysis"""
00079         this = _calanalysis.new_calanalysis()
00080         try: self.this.append(this)
00081         except: self.this = this
00082     __swig_destroy__ = _calanalysis.delete_calanalysis
00083     __del__ = lambda self : None;
00084     def open(self, *args, **kwargs):
00085         """
00086         open(self, caltable=string("")) -> bool
00087 
00088         Summary
00089                 
00090         Open a calibration table.
00091 
00092 
00093         Input Parameters:
00094                 caltable         Python string containing the calibration table name. 
00095                 
00096         --------------------------------------------------------------------------------
00097                       
00098         """
00099         return _calanalysis.calanalysis_open(self, *args, **kwargs)
00100 
00101     def close(self):
00102         """
00103         close(self) -> bool
00104 
00105         Summary
00106                 
00107         Close a calibration table.
00108 
00109         --------------------------------------------------------------------------------
00110                       
00111         """
00112         return _calanalysis.calanalysis_close(self)
00113 
00114     def calname(self):
00115         """
00116         calname(self) -> string
00117 
00118         Summary
00119                 
00120         Return the calibration table name.
00121 
00122         --------------------------------------------------------------------------------
00123                       
00124         """
00125         return _calanalysis.calanalysis_calname(self)
00126 
00127     def msname(self):
00128         """
00129         msname(self) -> string
00130 
00131         Summary
00132                 
00133         Return the name of the MS that created this calibration table.
00134 
00135         --------------------------------------------------------------------------------
00136                       
00137         """
00138         return _calanalysis.calanalysis_msname(self)
00139 
00140     def viscal(self):
00141         """
00142         viscal(self) -> string
00143 
00144         Summary
00145                 
00146         Return the type of calibration table ('B', 'G', 'T', etc.).
00147 
00148         --------------------------------------------------------------------------------
00149                       
00150         """
00151         return _calanalysis.calanalysis_viscal(self)
00152 
00153     def partype(self):
00154         """
00155         partype(self) -> string
00156 
00157         Summary
00158                 
00159         Return the parameter column type in the calibration table ('Complex' or
00160         'Float').
00161 
00162         --------------------------------------------------------------------------------
00163                       
00164         """
00165         return _calanalysis.calanalysis_partype(self)
00166 
00167     def polbasis(self):
00168         """
00169         polbasis(self) -> string
00170 
00171         Summary
00172                 
00173         Return the polarization basis in the calibration table ('L' for linear or 'C'
00174         for circular).
00175 
00176         --------------------------------------------------------------------------------
00177                       
00178         """
00179         return _calanalysis.calanalysis_polbasis(self)
00180 
00181     def numfield(self):
00182         """
00183         numfield(self) -> int
00184 
00185         Summary
00186                 
00187         Return the number of fields in the calibration table.
00188 
00189         --------------------------------------------------------------------------------
00190                       
00191         """
00192         return _calanalysis.calanalysis_numfield(self)
00193 
00194     def field(self, name=True):
00195         """
00196         field(self, name=True) -> std::vector< std::string >
00197 
00198         Summary
00199                 
00200         Return the fields in the calibration table.
00201 
00202 
00203         Input Parameters:
00204                 name             The python boolean which determines whether field names (True) or field numbers (False) are returned. true 
00205                 
00206         --------------------------------------------------------------------------------
00207                       
00208         """
00209         return _calanalysis.calanalysis_field(self, name)
00210 
00211     def numantenna(self):
00212         """
00213         numantenna(self) -> int
00214 
00215         Summary
00216                 
00217         Return the number of antennas in the calibration table.
00218 
00219         --------------------------------------------------------------------------------
00220                       
00221         """
00222         return _calanalysis.calanalysis_numantenna(self)
00223 
00224     def numantenna1(self):
00225         """
00226         numantenna1(self) -> int
00227 
00228         Summary
00229                 
00230         Return the number of antenna 1s in the calibration table.
00231 
00232         --------------------------------------------------------------------------------
00233                       
00234         """
00235         return _calanalysis.calanalysis_numantenna1(self)
00236 
00237     def numantenna2(self):
00238         """
00239         numantenna2(self) -> int
00240 
00241         Summary
00242                 
00243         Return the number of antenna 2s in the calibration table.
00244 
00245         --------------------------------------------------------------------------------
00246                       
00247         """
00248         return _calanalysis.calanalysis_numantenna2(self)
00249 
00250     def antenna(self, name=True):
00251         """
00252         antenna(self, name=True) -> std::vector< std::string >
00253 
00254         Summary
00255                 
00256         Return the antennas in the calibration table.
00257 
00258 
00259         Input Parameters:
00260                 name             The python boolean which determines whether antenna names (True) or antenna numbers (False) are returned. true 
00261                 
00262         --------------------------------------------------------------------------------
00263                       
00264         """
00265         return _calanalysis.calanalysis_antenna(self, name)
00266 
00267     def antenna1(self, name=True):
00268         """
00269         antenna1(self, name=True) -> std::vector< std::string >
00270 
00271         Summary
00272                 
00273         Return the antenna 1s in the calibration table.
00274 
00275 
00276         Input Parameters:
00277                 name             The python boolean which determines whether antenna 1 names (True) or antenna 1 numbers (False) are returned. true 
00278                 
00279         --------------------------------------------------------------------------------
00280                       
00281         """
00282         return _calanalysis.calanalysis_antenna1(self, name)
00283 
00284     def antenna2(self, name=True):
00285         """
00286         antenna2(self, name=True) -> std::vector< std::string >
00287 
00288         Summary
00289                 
00290         Return the antenna 2s in the calibration table.
00291 
00292 
00293         Input Parameters:
00294                 name             The python boolean which determines whether antenna 2 names (True) or antenna 2 numbers (False) are returned. true 
00295                 
00296         --------------------------------------------------------------------------------
00297                       
00298         """
00299         return _calanalysis.calanalysis_antenna2(self, name)
00300 
00301     def numfeed(self):
00302         """
00303         numfeed(self) -> int
00304 
00305         Summary
00306                 
00307         Return the number of feeds in the calibration table.
00308 
00309         --------------------------------------------------------------------------------
00310                       
00311         """
00312         return _calanalysis.calanalysis_numfeed(self)
00313 
00314     def feed(self):
00315         """
00316         feed(self) -> std::vector< std::string >
00317 
00318         Summary
00319                 
00320         Return the feeds in the calibration table.
00321 
00322         --------------------------------------------------------------------------------
00323                       
00324         """
00325         return _calanalysis.calanalysis_feed(self)
00326 
00327     def numtime(self):
00328         """
00329         numtime(self) -> int
00330 
00331         Summary
00332                 
00333         Return the number of times in the calibration table.
00334 
00335         --------------------------------------------------------------------------------
00336                       
00337         """
00338         return _calanalysis.calanalysis_numtime(self)
00339 
00340     def time(self):
00341         """
00342         time(self) -> std::vector< double >
00343 
00344         Summary
00345                 
00346         Return the times (in MJD seconds) in the calibration table.
00347 
00348         --------------------------------------------------------------------------------
00349                       
00350         """
00351         return _calanalysis.calanalysis_time(self)
00352 
00353     def numspw(self):
00354         """
00355         numspw(self) -> int
00356 
00357         Summary
00358                 
00359         Return the number of spectral windows in the calibration table.
00360 
00361         --------------------------------------------------------------------------------
00362                       
00363         """
00364         return _calanalysis.calanalysis_numspw(self)
00365 
00366     def spw(self, name=True):
00367         """
00368         spw(self, name=True) -> std::vector< std::string >
00369 
00370         Summary
00371                 
00372         Return the spectral windows in the calibration table.
00373 
00374 
00375         Input Parameters:
00376                 name             The python boolean which determines whether spectral window names (True) or spectral window numbers (False) are returned. true 
00377                 
00378         --------------------------------------------------------------------------------
00379                       
00380         """
00381         return _calanalysis.calanalysis_spw(self, name)
00382 
00383     def numchannel(self):
00384         """
00385         numchannel(self) -> std::vector< int >
00386 
00387         Summary
00388                 
00389         Return the number of channels per spectral window in the calibration table.
00390 
00391         --------------------------------------------------------------------------------
00392                       
00393         """
00394         return _calanalysis.calanalysis_numchannel(self)
00395 
00396     def freq(self):
00397         """
00398         freq(self) -> record *
00399 
00400         Summary
00401                 
00402         Return the frequencies per spectral window in the calibration table.
00403 
00404         --------------------------------------------------------------------------------
00405                       
00406         """
00407         return _calanalysis.calanalysis_freq(self)
00408 
00409     def get(self, *args, **kwargs):
00410         """
00411         get(self, field=initialize_variant(""), antenna=initialize_variant(""), timerange=initialize_variant(""), 
00412             spw=initialize_variant(""), feed=initialize_variant(""), axis=string("TIME"), 
00413             ap=string("AMPLITUDE"), norm=False, unwrap=False, jumpmax=0.0) -> record *
00414 
00415         Summary
00416                 
00417         Return the calibration data.
00418 
00419 
00420         Input Parameters:
00421                 field            The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields). 
00422                 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). 
00423                 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). 
00424                 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). 
00425                 feed             The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds). 
00426                 axis             The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ'). TIME 
00427                 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. AMPLITUDE 
00428                 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'. false 
00429                 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'. false 
00430                 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). 0.0 
00431                 
00432         --------------------------------------------------------------------------------
00433                       
00434         """
00435         return _calanalysis.calanalysis_get(self, *args, **kwargs)
00436 
00437     def fit(self, *args, **kwargs):
00438         """
00439         fit(self, field=initialize_variant(""), antenna=initialize_variant(""), timerange=initialize_variant(""), 
00440             spw=initialize_variant(""), feed=initialize_variant(""), axis=string("TIME"), 
00441             ap=string("AMPLITUDE"), norm=False, unwrap=False, jumpmax=0.0, 
00442             order=string("AVERAGE"), type=string("LSQ"), weight=False) -> record *
00443 
00444         Summary
00445                 
00446         Return the calibration data and fits along the non-iteration axis.
00447 
00448 
00449         Input Parameters:
00450                 field            The python comma-delimited string or list of strings containing the field names or numbers. The default is '' (all fields). 
00451                 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). 
00452                 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). 
00453                 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). 
00454                 feed             The python comma-delimited string or list of strings containing the feeds. The default is '' (all feeds). 
00455                 axis             The python string containing the user-specified iteration axis. The allowed values are 'TIME' and 'FREQ'. The default is '' ('FREQ'). TIME 
00456                 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. AMPLITUDE 
00457                 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'. false 
00458                 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'. false 
00459                 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). 0.0 
00460                 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'. AVERAGE 
00461                 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. LSQ 
00462                 weight           The python boolean which determines the weighting. The default is False. false 
00463                 
00464         --------------------------------------------------------------------------------
00465                       
00466         """
00467         return _calanalysis.calanalysis_fit(self, *args, **kwargs)
00468 
00469 calanalysis_swigregister = _calanalysis.calanalysis_swigregister
00470 calanalysis_swigregister(calanalysis)
00471 
00472 # This file is compatible with both classic and new-style classes.
00473 
00474