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('_msmetadata', [dirname(__file__)])
00017 except ImportError:
00018 import _msmetadata
00019 return _msmetadata
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_msmetadata', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _msmetadata = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _msmetadata
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 msmetadata(_object):
00071 """Proxy of C++ casac::msmetadata class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, msmetadata, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, msmetadata, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> msmetadata"""
00079 this = _msmetadata.new_msmetadata()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _msmetadata.delete_msmetadata
00083 __del__ = lambda self : None;
00084 def antennaid(self, *args, **kwargs):
00085 """
00086 antennaid(self, name=string("")) -> int
00087
00088 Summary
00089 Get the zero-based antenna ID for the specfied antenna name.
00090
00091 Input Parameters:
00092 name Zero-based antenna ID for which to get the antenna name.
00093
00094 --------------------------------------------------------------------------------
00095
00096 """
00097 return _msmetadata.msmetadata_antennaid(self, *args, **kwargs)
00098
00099 def antennaname(self, *args, **kwargs):
00100 """
00101 antennaname(self, antennaid=-1) -> string
00102
00103 Summary
00104 Get the name of the antenna for the specfied zero-based antenna ID.
00105
00106 Input Parameters:
00107 antennaid Zero-based antenna ID for which to get the antenna name. -1
00108
00109 --------------------------------------------------------------------------------
00110
00111 """
00112 return _msmetadata.msmetadata_antennaname(self, *args, **kwargs)
00113
00114 def chanavgspws(self):
00115 """
00116 chanavgspws(self) -> std::vector< int >
00117
00118 Summary
00119 Get an array of spectral window IDs used for channel averages. These are windows that do have 1 channel.
00120 --------------------------------------------------------------------------------
00121
00122 """
00123 return _msmetadata.msmetadata_chanavgspws(self)
00124
00125 def done(self):
00126 """
00127 done(self) -> bool
00128
00129 Summary
00130 Close this tool and reclaim system resources associated with it.
00131 --------------------------------------------------------------------------------
00132
00133 """
00134 return _msmetadata.msmetadata_done(self)
00135
00136 def fdmspws(self):
00137 """
00138 fdmspws(self) -> std::vector< int >
00139
00140 Summary
00141 Get an array of spectral window IDs used for FDM. These are windows that do not have 64, 128, or 256 channels.
00142 --------------------------------------------------------------------------------
00143
00144 """
00145 return _msmetadata.msmetadata_fdmspws(self)
00146
00147 def fieldsforintent(self, *args, **kwargs):
00148 """
00149 fieldsforintent(self, intent=string(""), asnames=False) -> variant *
00150
00151 Summary
00152 Get an array of the unique fields for the specified intent.
00153
00154 Input Parameters:
00155 intent Intent (case sensitive) for which to return the fields.
00156 asnames If true, return the field names. If false, return the zero-based field IDs. false
00157
00158 --------------------------------------------------------------------------------
00159
00160 """
00161 return _msmetadata.msmetadata_fieldsforintent(self, *args, **kwargs)
00162
00163 def fieldsforname(self, *args, **kwargs):
00164 """
00165 fieldsforname(self, name=string("")) -> std::vector< int >
00166
00167 Summary
00168 Get an array of the unique, zero-based field IDs for the specified field name.
00169
00170 Input Parameters:
00171 name Field name (case sensitive) for which to return the fields.
00172
00173 --------------------------------------------------------------------------------
00174
00175 """
00176 return _msmetadata.msmetadata_fieldsforname(self, *args, **kwargs)
00177
00178 def fieldsforscan(self, *args, **kwargs):
00179 """
00180 fieldsforscan(self, scan=-1, asnames=False) -> variant *
00181
00182 Summary
00183 Get an array of the unique fields for the specified scan number.
00184
00185 Input Parameters:
00186 scan Scan number for which to return the fields. -1
00187 asnames If true, return the field names. If false, return the zero-based field IDs. false
00188
00189 --------------------------------------------------------------------------------
00190
00191 """
00192 return _msmetadata.msmetadata_fieldsforscan(self, *args, **kwargs)
00193
00194 def fieldsforscans(self, *args, **kwargs):
00195 """
00196 fieldsforscans(self, scans=std::vector< int >(), asnames=False) -> variant *
00197
00198 Summary
00199 Get an array of the unique fields for the specified scan numbers.
00200
00201 Input Parameters:
00202 scans Scan numbers for which to return the fields.
00203 asnames If true, return the field names. If false, return the zero-based field IDs. false
00204
00205 --------------------------------------------------------------------------------
00206
00207 """
00208 return _msmetadata.msmetadata_fieldsforscans(self, *args, **kwargs)
00209
00210 def fieldsforspw(self, *args, **kwargs):
00211 """
00212 fieldsforspw(self, spw=-1, asnames=False) -> variant *
00213
00214 Summary
00215 Get an array of the unique fields for the specified spectral window.
00216
00217 Input Parameters:
00218 spw Zero-based spectral window ID for which to return the fields. -1
00219 asnames If true, return the field names. If false, return the zero-based field IDs. false
00220
00221 --------------------------------------------------------------------------------
00222
00223 """
00224 return _msmetadata.msmetadata_fieldsforspw(self, *args, **kwargs)
00225
00226 def fieldsfortimes(self, *args, **kwargs):
00227 """
00228 fieldsfortimes(self, time=-1, tol=0) -> std::vector< int >
00229
00230 Summary
00231 Get an array of the unique, zero-based, field IDs for the specified time range (time-tol to time+tol).
00232
00233 Input Parameters:
00234 time Time at center of time range. -1
00235 tol Time on either side of center for specifying range. 0
00236
00237 --------------------------------------------------------------------------------
00238
00239 """
00240 return _msmetadata.msmetadata_fieldsfortimes(self, *args, **kwargs)
00241
00242 def intents(self):
00243 """
00244 intents(self) -> std::vector< std::string >
00245
00246 Summary
00247 Get an array of the unique intents associated with the MS.
00248 --------------------------------------------------------------------------------
00249
00250 """
00251 return _msmetadata.msmetadata_intents(self)
00252
00253 def intentsforscan(self, *args, **kwargs):
00254 """
00255 intentsforscan(self, scan=-1) -> std::vector< std::string >
00256
00257 Summary
00258 Get an array of the unique intents for the specified scan.
00259
00260 Input Parameters:
00261 scan Scan number for which to return the intents. -1
00262
00263 --------------------------------------------------------------------------------
00264
00265 """
00266 return _msmetadata.msmetadata_intentsforscan(self, *args, **kwargs)
00267
00268 def intentsforspw(self, *args, **kwargs):
00269 """
00270 intentsforspw(self, spw=-1) -> std::vector< std::string >
00271
00272 Summary
00273 Get an array of the unique intents for the specified spectral window ID.
00274
00275 Input Parameters:
00276 spw Spectral window ID (>=0) for which to return the intents. -1
00277
00278 --------------------------------------------------------------------------------
00279
00280 """
00281 return _msmetadata.msmetadata_intentsforspw(self, *args, **kwargs)
00282
00283 def nantennas(self):
00284 """
00285 nantennas(self) -> int
00286
00287 Summary
00288 Get the number of antennas associated with the MS.
00289 --------------------------------------------------------------------------------
00290
00291 """
00292 return _msmetadata.msmetadata_nantennas(self)
00293
00294 def nameforfield(self, *args, **kwargs):
00295 """
00296 nameforfield(self, field=-1) -> string
00297
00298 Summary
00299 Get the name of the specified field.
00300
00301 Input Parameters:
00302 field Zero-based field ID for which to get the name. -1
00303
00304 --------------------------------------------------------------------------------
00305
00306 """
00307 return _msmetadata.msmetadata_nameforfield(self, *args, **kwargs)
00308
00309 def nfields(self):
00310 """
00311 nfields(self) -> int
00312
00313 Summary
00314 Get the number of fields associated with the MS.
00315 --------------------------------------------------------------------------------
00316
00317 """
00318 return _msmetadata.msmetadata_nfields(self)
00319
00320 def nspw(self):
00321 """
00322 nspw(self) -> int
00323
00324 Summary
00325 Get the number of spectral windows associated with the MS.
00326 --------------------------------------------------------------------------------
00327
00328 """
00329 return _msmetadata.msmetadata_nspw(self)
00330
00331 def nstates(self):
00332 """
00333 nstates(self) -> int
00334
00335 Summary
00336 Get the number of states (from the STATE table) associated with the MS.
00337 --------------------------------------------------------------------------------
00338
00339 """
00340 return _msmetadata.msmetadata_nstates(self)
00341
00342 def nscans(self):
00343 """
00344 nscans(self) -> int
00345
00346 Summary
00347 Get the number of scans associated with the MS.
00348 --------------------------------------------------------------------------------
00349
00350 """
00351 return _msmetadata.msmetadata_nscans(self)
00352
00353 def nvis(self):
00354 """
00355 nvis(self) -> int
00356
00357 Summary
00358 Get the number of visibilities (from the main table) associated with the MS.
00359 --------------------------------------------------------------------------------
00360
00361 """
00362 return _msmetadata.msmetadata_nvis(self)
00363
00364 def open(self, *args, **kwargs):
00365 """
00366 open(self, msfile=string("")) -> bool
00367
00368 Summary
00369 Attach the MS metadata tool to the specified MS
00370
00371 Input Parameters:
00372 msfile Name of the existing measurement set
00373
00374 --------------------------------------------------------------------------------
00375
00376 """
00377 return _msmetadata.msmetadata_open(self, *args, **kwargs)
00378
00379 def scannumbers(self):
00380 """
00381 scannumbers(self) -> std::vector< int >
00382
00383 Summary
00384 Get an array of the unique scan numbers associated with the MS.
00385 --------------------------------------------------------------------------------
00386
00387 """
00388 return _msmetadata.msmetadata_scannumbers(self)
00389
00390 def scansforfield(self, *args, **kwargs):
00391 """
00392 scansforfield(self, intent=initialize_variant("")) -> std::vector< int >
00393
00394 Summary
00395 Get an array of the unique scan numbers associated with the specified field.
00396
00397 Input Parameters:
00398 intent Field ID or field name (case sensitive) for which to return the scan numbers.
00399
00400 --------------------------------------------------------------------------------
00401
00402 """
00403 return _msmetadata.msmetadata_scansforfield(self, *args, **kwargs)
00404
00405 def scansforintent(self, *args, **kwargs):
00406 """
00407 scansforintent(self, intent=string("-1")) -> std::vector< int >
00408
00409 Summary
00410 Get an array of the unique scan numbers associated with the specified intent.
00411
00412 Input Parameters:
00413 intent Intent (case-sensitive) for which to return the scan numbers. -1
00414
00415 --------------------------------------------------------------------------------
00416
00417 """
00418 return _msmetadata.msmetadata_scansforintent(self, *args, **kwargs)
00419
00420 def scansforspw(self, *args, **kwargs):
00421 """
00422 scansforspw(self, spw=-1) -> std::vector< int >
00423
00424 Summary
00425 Get an array of the unique scan numbers associated with the specified zero-based spectral window ID.
00426
00427 Input Parameters:
00428 spw Zero-based spectral window ID for which to return the scan numbers. -1
00429
00430 --------------------------------------------------------------------------------
00431
00432 """
00433 return _msmetadata.msmetadata_scansforspw(self, *args, **kwargs)
00434
00435 def scansforstate(self, *args, **kwargs):
00436 """
00437 scansforstate(self, state=-1) -> std::vector< int >
00438
00439 Summary
00440 Get an array of the unique scan numbers for the specified state.
00441
00442 Input Parameters:
00443 state ID of state for which to return the scan numbers. -1
00444
00445 --------------------------------------------------------------------------------
00446
00447 """
00448 return _msmetadata.msmetadata_scansforstate(self, *args, **kwargs)
00449
00450 def scansfortimes(self, *args, **kwargs):
00451 """
00452 scansfortimes(self, time=-1, tol=0) -> std::vector< int >
00453
00454 Summary
00455 Get an array of the unique scan numbers for the specified time range (time-tol to time+tol).
00456
00457 Input Parameters:
00458 time Time at center of time range. -1
00459 tol Time on either side of center for specifying range. 0
00460
00461 --------------------------------------------------------------------------------
00462
00463 """
00464 return _msmetadata.msmetadata_scansfortimes(self, *args, **kwargs)
00465
00466 def spwsforfield(self, *args, **kwargs):
00467 """
00468 spwsforfield(self, field=initialize_variant("")) -> std::vector< int >
00469
00470 Summary
00471 Get an array of the unique spectral window IDs for the specified field.
00472
00473 Input Parameters:
00474 field Field (case sensitive string or zero-based integer ID) for which to return the spectral window IDs.
00475
00476 --------------------------------------------------------------------------------
00477
00478 """
00479 return _msmetadata.msmetadata_spwsforfield(self, *args, **kwargs)
00480
00481 def spwsforintent(self, *args, **kwargs):
00482 """
00483 spwsforintent(self, intent=string("")) -> std::vector< int >
00484
00485 Summary
00486 Get an array of the unique spectral window IDs for the specified intent.
00487
00488 Input Parameters:
00489 intent Intent (case sensitive) for which to return the spectral window IDs.
00490
00491 --------------------------------------------------------------------------------
00492
00493 """
00494 return _msmetadata.msmetadata_spwsforintent(self, *args, **kwargs)
00495
00496 def spwsforscan(self, *args, **kwargs):
00497 """
00498 spwsforscan(self, scan=-1) -> std::vector< int >
00499
00500 Summary
00501 Get an array of the unique spectral window IDs for the specified scan number.
00502
00503 Input Parameters:
00504 scan Scan number for which to return the spectral window IDs. -1
00505
00506 --------------------------------------------------------------------------------
00507
00508 """
00509 return _msmetadata.msmetadata_spwsforscan(self, *args, **kwargs)
00510
00511 def statesforscan(self, *args, **kwargs):
00512 """
00513 statesforscan(self, scan=-1) -> std::vector< int >
00514
00515 Summary
00516 Get an array of the unique state IDs for the specified scan number.
00517
00518 Input Parameters:
00519 scan Scan number for which to return the state IDs. -1
00520
00521 --------------------------------------------------------------------------------
00522
00523 """
00524 return _msmetadata.msmetadata_statesforscan(self, *args, **kwargs)
00525
00526 def tdmspws(self):
00527 """
00528 tdmspws(self) -> std::vector< int >
00529
00530 Summary
00531 Get an array of spectral window IDs used for TDM. These are windows that have 64, 128, or 256 channels.
00532 --------------------------------------------------------------------------------
00533
00534 """
00535 return _msmetadata.msmetadata_tdmspws(self)
00536
00537 def timesforfield(self, *args, **kwargs):
00538 """
00539 timesforfield(self, field=-1) -> std::vector< double >
00540
00541 Summary
00542 Get an array of the unique times for the specified field.
00543
00544 Input Parameters:
00545 field Zero-based field ID for which to return the times. -1
00546
00547 --------------------------------------------------------------------------------
00548
00549 """
00550 return _msmetadata.msmetadata_timesforfield(self, *args, **kwargs)
00551
00552 def timesforscan(self, *args, **kwargs):
00553 """
00554 timesforscan(self, scan=-1) -> std::vector< double >
00555
00556 Summary
00557 Get an array of the unique times for the specified scan number.
00558
00559 Input Parameters:
00560 scan Scan number for which to return the times. -1
00561
00562 --------------------------------------------------------------------------------
00563
00564 """
00565 return _msmetadata.msmetadata_timesforscan(self, *args, **kwargs)
00566
00567 def timesforscans(self, *args, **kwargs):
00568 """
00569 timesforscans(self, scans=initialize_vector(1, (int)-1)) -> std::vector< double >
00570
00571 Summary
00572 Get an array of the unique times for the specified scan numbers.
00573
00574 Input Parameters:
00575 scans Scan numbers for which to return the times. -1
00576
00577 --------------------------------------------------------------------------------
00578
00579 """
00580 return _msmetadata.msmetadata_timesforscans(self, *args, **kwargs)
00581
00582 def wvrspws(self):
00583 """
00584 wvrspws(self) -> std::vector< int >
00585
00586 Summary
00587 Get an array of spectral window IDs used for WVR. These are windows that have 4 channels.
00588 --------------------------------------------------------------------------------
00589
00590 """
00591 return _msmetadata.msmetadata_wvrspws(self)
00592
00593 msmetadata_swigregister = _msmetadata.msmetadata_swigregister
00594 msmetadata_swigregister(msmetadata)
00595
00596
00597
00598