00001
00002
00003
00004
00005
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('_lightflagger', [dirname(__file__)])
00017 except ImportError:
00018 import _lightflagger
00019 return _lightflagger
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_lightflagger', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _lightflagger = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _lightflagger
00030 del version_info
00031 try:
00032 _swig_property = property
00033 except NameError:
00034 pass
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 lightflagger(_object):
00071 """Proxy of C++ casac::lightflagger class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, lightflagger, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, lightflagger, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> lightflagger"""
00079 this = _lightflagger.new_lightflagger()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _lightflagger.delete_lightflagger
00083 __del__ = lambda self : None;
00084 def open(self, *args, **kwargs):
00085 """
00086 open(self, msname=string("")) -> bool
00087
00088 Summary
00089 Attaches tool to a measurement set.
00090
00091 Input Parameters:
00092 msname Measurement set to be processed
00093
00094 --------------------------------------------------------------------------------
00095
00096 """
00097 return _lightflagger.lightflagger_open(self, *args, **kwargs)
00098
00099 def setdata(self, *args, **kwargs):
00100 """
00101 setdata(self, field=string(""), spw=string(""), array=string(""), feed=string(""), scan=string(""),
00102 baseline=string(""), uvrange=string(""), time=string(""), correlation=string("")) -> bool
00103
00104 Summary
00105 Set the data selection parameters to define a
00106 subset of the data on which to perform any further selections/operations.
00107 For unspecified parameters, the full data range is assumed.
00108 All data selection parameters follow the ms-selection syntax.
00109
00110
00111 Input Parameters:
00112 field Field indices or source names : example : '2,3C48'
00113 spw Spectral Window Indices or names : example : '1,2'
00114 array Array Indices or names : example : 'VLAA'
00115 feed Feed index or name : example : '1,2'
00116 scan Scan number : example : '1,2,3'
00117 baseline Baseline number : example : '2-3,4-5,132 ????'
00118 uvrange UV-distance range, with a unit : example : '2.0-3000.0 m'
00119 time Time range, as MJDs or date strings : example : 'xx.x.x.x.x~yy.y.y.y.y'
00120 correlation Correlations/polarizations : example : 'RR,LL,RL,LR,XX,YY,XY,YX'
00121
00122 --------------------------------------------------------------------------------
00123
00124 """
00125 return _lightflagger.lightflagger_setdata(self, *args, **kwargs)
00126
00127 def getparameters(self, *args, **kwargs):
00128 """
00129 getparameters(self, algorithm=string("none")) -> record *
00130
00131 Summary
00132 Retrieve the current set of input parameters for a specified algorithm.
00133 n This returns a python dictionary of parameters and their values.
00134
00135
00136 Input Parameters:
00137 algorithm Autoflag Algorithm name timemed freqmed none
00138
00139 --------------------------------------------------------------------------------
00140
00141 """
00142 return _lightflagger.lightflagger_getparameters(self, *args, **kwargs)
00143
00144 def setparameters(self, *args, **kwargs):
00145 """
00146 setparameters(self, algorithm=string("none"), parameters=initialize_record("")) -> bool
00147
00148 Summary
00149 Setup an autoflag algorithm.
00150
00151
00152 Input Parameters:
00153 algorithm Autoflag Algorithm name timemedian freqmedian spectralreject uvbin none
00154 parameters Parameters for each autoflag algorithm.
00155
00156 --------------------------------------------------------------------------------
00157
00158 """
00159 return _lightflagger.lightflagger_setparameters(self, *args, **kwargs)
00160
00161 def run(self, *args, **kwargs):
00162 """
00163 run(self, parameters=initialize_record("")) -> record *
00164
00165 Summary
00166 Executes a flagging run
00167
00168 Input Parameters:
00169 parameters Generic parameters
00170
00171 --------------------------------------------------------------------------------
00172
00173 """
00174 return _lightflagger.lightflagger_run(self, *args, **kwargs)
00175
00176 def done(self):
00177 """
00178 done(self) -> bool
00179
00180 Summary
00181 Destroys the flag tool
00182 --------------------------------------------------------------------------------
00183
00184 """
00185 return _lightflagger.lightflagger_done(self)
00186
00187 def saveflagversion(self, *args, **kwargs):
00188 """
00189 saveflagversion(self, versionname=string(""), comment=string(""), merge=string("")) -> bool
00190
00191 Summary
00192 *** n Save current flags with a version name.***
00193
00194
00195 Input Parameters:
00196 versionname Version name
00197 comment Comment for this flag table
00198 merge merge type
00199
00200 --------------------------------------------------------------------------------
00201
00202 """
00203 return _lightflagger.lightflagger_saveflagversion(self, *args, **kwargs)
00204
00205 def restoreflagversion(self, *args, **kwargs):
00206 """
00207 restoreflagversion(self, versionname=std::vector< string >(1, ""), merge=string("")) -> bool
00208
00209 Summary
00210 *** n Restore flags from a saved flag_version.
00211 n versionname : name of flag version to restore to main table
00212 n merge : Type of operation to perform during restoration.
00213 n merge = replace : replaces the main table flags.
00214 n merge = and : logical AND with main table flags
00215 n merge = or : logical OR with main table flags
00216 n Default : replace.
00217 n ***
00218
00219 Input Parameters:
00220 versionname Version name
00221 merge merge type
00222
00223 --------------------------------------------------------------------------------
00224
00225 """
00226 return _lightflagger.lightflagger_restoreflagversion(self, *args, **kwargs)
00227
00228 def deleteflagversion(self, *args, **kwargs):
00229 """
00230 deleteflagversion(self, versionname=std::vector< string >(1, "")) -> bool
00231
00232 Summary
00233 *** n Delete a saved flag_version.
00234 ***
00235
00236 Input Parameters:
00237 versionname Version name
00238
00239 --------------------------------------------------------------------------------
00240
00241 """
00242 return _lightflagger.lightflagger_deleteflagversion(self, *args, **kwargs)
00243
00244 def getflagversionlist(self, printflags=True):
00245 """
00246 getflagversionlist(self, printflags=True) -> std::vector< std::string >
00247
00248 Summary
00249 *** n Print out a list of saved flag_versions.
00250 ***
00251
00252 Input Parameters:
00253 printflags Print flagversions in logger? true
00254
00255 --------------------------------------------------------------------------------
00256
00257 """
00258 return _lightflagger.lightflagger_getflagversionlist(self, printflags)
00259
00260 lightflagger_swigregister = _lightflagger.lightflagger_swigregister
00261 lightflagger_swigregister(lightflagger)
00262
00263
00264
00265