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('_measures', [dirname(__file__)])
00017 except ImportError:
00018 import _measures
00019 return _measures
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_measures', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _measures = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _measures
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 measures(_object):
00071 """Proxy of C++ casac::measures class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, measures, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, measures, name)
00076 __repr__ = _swig_repr
00077 __swig_setmethods__["_dot_touvw"] = _measures.measures__dot_touvw_set
00078 __swig_getmethods__["_dot_touvw"] = _measures.measures__dot_touvw_get
00079 if _newclass:_dot_touvw = _swig_property(_measures.measures__dot_touvw_get, _measures.measures__dot_touvw_set)
00080 __swig_setmethods__["_xyz_touvw"] = _measures.measures__xyz_touvw_set
00081 __swig_getmethods__["_xyz_touvw"] = _measures.measures__xyz_touvw_get
00082 if _newclass:_xyz_touvw = _swig_property(_measures.measures__xyz_touvw_get, _measures.measures__xyz_touvw_set)
00083 __swig_setmethods__["_xyz_expand"] = _measures.measures__xyz_expand_set
00084 __swig_getmethods__["_xyz_expand"] = _measures.measures__xyz_expand_get
00085 if _newclass:_xyz_expand = _swig_property(_measures.measures__xyz_expand_get, _measures.measures__xyz_expand_set)
00086 def __init__(self):
00087 """__init__(self) -> measures"""
00088 this = _measures.new_measures()
00089 try: self.this.append(this)
00090 except: self.this = this
00091 __swig_destroy__ = _measures.delete_measures
00092 __del__ = lambda self : None;
00093 def dirshow(self, *args, **kwargs):
00094 """
00095 dirshow(self, v) -> string
00096
00097 Summary
00098
00099
00100 Show direction measure as a string.
00101
00102
00103 Input Parameters:
00104 v a direction measure value to be converted to string
00105
00106 --------------------------------------------------------------------------------
00107
00108 """
00109 return _measures.measures_dirshow(self, *args, **kwargs)
00110
00111 def show(self, *args, **kwargs):
00112 """
00113 show(self, v, refcode=True) -> string
00114
00115 Summary
00116 Show a measure as a string
00117
00118
00119 Input Parameters:
00120 v measure value to be converted to string
00121 refcode add the reference code to output true
00122
00123 --------------------------------------------------------------------------------
00124
00125 """
00126 return _measures.measures_show(self, *args, **kwargs)
00127
00128 def epoch(self, *args, **kwargs):
00129 """
00130 epoch(self, rf=string("UTC"), v0=initialize_variant(""), off=initialize_record("")) -> record *
00131
00132 Summary
00133 define an epoch measure
00134
00135 Input Parameters:
00136 rf reference code UTC
00137 v0 epoch value
00138 off optional offset epoch measure
00139
00140 --------------------------------------------------------------------------------
00141
00142 """
00143 return _measures.measures_epoch(self, *args, **kwargs)
00144
00145 def direction(self, *args, **kwargs):
00146 """
00147 direction(self, rf=string("J2000"), v0=initialize_variant(""), v1=initialize_variant(""), off=initialize_record("")) -> record *
00148
00149 Summary
00150 define a direction measure
00151
00152 Input Parameters:
00153 rf reference code J2000
00154 v0 longitude
00155 v1 latitude
00156 off optional offset direction measure
00157
00158 --------------------------------------------------------------------------------
00159
00160 """
00161 return _measures.measures_direction(self, *args, **kwargs)
00162
00163 def getvalue(self, *args, **kwargs):
00164 """
00165 getvalue(self, v) -> record *
00166
00167 Summary
00168 get the value of a measure
00169
00170 Input Parameters:
00171 v measure (array of measures)
00172
00173 --------------------------------------------------------------------------------
00174
00175 """
00176 return _measures.measures_getvalue(self, *args, **kwargs)
00177
00178 def gettype(self, *args, **kwargs):
00179 """
00180 gettype(self, v) -> string
00181
00182 Summary
00183 get the type of a measure
00184
00185 Input Parameters:
00186 v measure (array of measures)
00187
00188 --------------------------------------------------------------------------------
00189
00190 """
00191 return _measures.measures_gettype(self, *args, **kwargs)
00192
00193 def getref(self, *args, **kwargs):
00194 """
00195 getref(self, v) -> string
00196
00197 Summary
00198 get the reference code of a measure
00199
00200 Input Parameters:
00201 v measure (array of measures)
00202
00203 --------------------------------------------------------------------------------
00204
00205 """
00206 return _measures.measures_getref(self, *args, **kwargs)
00207
00208 def getoffset(self, *args, **kwargs):
00209 """
00210 getoffset(self, v) -> record *
00211
00212 Summary
00213 get the offset of a measure
00214
00215 Input Parameters:
00216 v measure (array of measures)
00217
00218 --------------------------------------------------------------------------------
00219
00220 """
00221 return _measures.measures_getoffset(self, *args, **kwargs)
00222
00223 def cometname(self):
00224 """
00225 cometname(self) -> string
00226
00227 Summary
00228 get the current comet name
00229 --------------------------------------------------------------------------------
00230
00231 """
00232 return _measures.measures_cometname(self)
00233
00234 def comettype(self):
00235 """
00236 comettype(self) -> string
00237
00238 Summary
00239 get the current comet table type
00240 --------------------------------------------------------------------------------
00241
00242 """
00243 return _measures.measures_comettype(self)
00244
00245 def cometdist(self):
00246 """
00247 cometdist(self) -> record *
00248
00249 Summary
00250 get the distance of the current comet in the current frame
00251 --------------------------------------------------------------------------------
00252
00253 """
00254 return _measures.measures_cometdist(self)
00255
00256 def cometangdiam(self):
00257 """
00258 cometangdiam(self) -> record *
00259
00260 Summary
00261 get the angular diameter of the current comet in the current frame
00262 --------------------------------------------------------------------------------
00263
00264 """
00265 return _measures.measures_cometangdiam(self)
00266
00267 def comettopo(self):
00268 """
00269 comettopo(self) -> record *
00270
00271 Summary
00272 get the current comet table coordinates
00273 --------------------------------------------------------------------------------
00274
00275 """
00276 return _measures.measures_comettopo(self)
00277
00278 def framecomet(self, *args, **kwargs):
00279 """
00280 framecomet(self, v=string("")) -> bool
00281
00282 Summary
00283 set the current comet table
00284
00285 Input Parameters:
00286 v name of a table
00287
00288 --------------------------------------------------------------------------------
00289
00290 """
00291 return _measures.measures_framecomet(self, *args, **kwargs)
00292
00293 def position(self, *args, **kwargs):
00294 """
00295 position(self, rf=string("WGS84"), v0=initialize_variant(""), v1=initialize_variant(""), v2=initialize_variant(""),
00296 off=initialize_record("")) -> record *
00297
00298 Summary
00299 define a position measure
00300
00301 Input Parameters:
00302 rf reference code WGS84
00303 v0 longitude or x
00304 v1 latitude or y
00305 v2 height or z
00306 off optional offset position measure
00307
00308 --------------------------------------------------------------------------------
00309
00310 """
00311 return _measures.measures_position(self, *args, **kwargs)
00312
00313 def observatory(self, *args, **kwargs):
00314 """
00315 observatory(self, name=string("ALMA")) -> record *
00316
00317 Summary
00318 get position of an observatory
00319
00320 Input Parameters:
00321 name observatory name - case insensitive ALMA
00322
00323 --------------------------------------------------------------------------------
00324
00325 """
00326 return _measures.measures_observatory(self, *args, **kwargs)
00327
00328 def obslist(self):
00329 """
00330 obslist(self) -> string
00331
00332 Summary
00333 get a list of known observatories
00334 --------------------------------------------------------------------------------
00335
00336 """
00337 return _measures.measures_obslist(self)
00338
00339 def linelist(self):
00340 """
00341 linelist(self) -> string
00342
00343 Summary
00344 get a list of known spectral lines
00345 --------------------------------------------------------------------------------
00346
00347 """
00348 return _measures.measures_linelist(self)
00349
00350 def spectralline(self, *args, **kwargs):
00351 """
00352 spectralline(self, name=string("HI")) -> record *
00353
00354 Summary
00355 get frequency of a spectral line
00356
00357 Input Parameters:
00358 name name HI
00359
00360 --------------------------------------------------------------------------------
00361
00362 """
00363 return _measures.measures_spectralline(self, *args, **kwargs)
00364
00365 def sourcelist(self):
00366 """
00367 sourcelist(self) -> string
00368
00369 Summary
00370 get a list of known sources
00371 --------------------------------------------------------------------------------
00372
00373 """
00374 return _measures.measures_sourcelist(self)
00375
00376 def source(self, *args, **kwargs):
00377 """
00378 source(self, name=initialize_variant("1934-638")) -> record *
00379
00380 Summary
00381 get direction of a source
00382
00383 Input Parameters:
00384 name name 1934-638
00385
00386 --------------------------------------------------------------------------------
00387
00388 """
00389 return _measures.measures_source(self, *args, **kwargs)
00390
00391 def frequency(self, *args, **kwargs):
00392 """
00393 frequency(self, rf=string("LSRK"), v0=initialize_variant(""), off=initialize_record("")) -> record *
00394
00395 Summary
00396 define a frequency measure
00397
00398 Input Parameters:
00399 rf reference code LSRK
00400 v0 frequency/wavelength/\ldots
00401 off optional offset frequency measure
00402
00403 --------------------------------------------------------------------------------
00404
00405 """
00406 return _measures.measures_frequency(self, *args, **kwargs)
00407
00408 def doppler(self, *args, **kwargs):
00409 """
00410 doppler(self, rf=string("RADIO"), v0=initialize_variant(""), off=initialize_record("")) -> record *
00411
00412 Summary
00413 define a doppler measure
00414
00415 Input Parameters:
00416 rf reference code RADIO
00417 v0 doppler ratio/velocity
00418 off optional offset doppler measure
00419
00420 --------------------------------------------------------------------------------
00421
00422 """
00423 return _measures.measures_doppler(self, *args, **kwargs)
00424
00425 def radialvelocity(self, *args, **kwargs):
00426 """
00427 radialvelocity(self, rf=string("LSRK"), v0=initialize_variant(""), off=initialize_record("")) -> record *
00428
00429 Summary
00430 define a radialvelocity measure
00431
00432 Input Parameters:
00433 rf reference code LSRK
00434 v0 radial velocity
00435 off optional offset radialvelocity measure
00436
00437 --------------------------------------------------------------------------------
00438
00439 """
00440 return _measures.measures_radialvelocity(self, *args, **kwargs)
00441
00442 def uvw(self, *args, **kwargs):
00443 """
00444 uvw(self, rf=string("ITRF"), v0=initialize_variant(""), v1=initialize_variant(""), v2=initialize_variant(""),
00445 off=initialize_record("")) -> record *
00446
00447 Summary
00448 define a uvw measure
00449
00450 Input Parameters:
00451 rf reference code ITRF
00452 v0 longitude or x
00453 v1 latitude or y
00454 v2 height or z
00455 off optional offset uvw measure
00456
00457 --------------------------------------------------------------------------------
00458
00459 """
00460 return _measures.measures_uvw(self, *args, **kwargs)
00461
00462 def touvw(self, *args, **kwargs):
00463 """
00464 touvw(self, v=initialize_record(""), _dot=_dot_touvw, _xyz=_xyz_touvw) -> record *
00465
00466 Summary
00467 calculate a uvw measure from a baseline
00468
00469 Input Parameters:
00470 v baseline measure
00471
00472
00473 Output Parameters:
00474 _dot uvw-dot (quantity array)
00475 _xyz uvw (quantity array)
00476
00477 --------------------------------------------------------------------------------
00478
00479 """
00480 return _measures.measures_touvw(self, *args, **kwargs)
00481
00482 def expand(self, *args, **kwargs):
00483 """
00484 expand(self, v=initialize_record(""), _xyz=_xyz_expand) -> record *
00485
00486 Summary
00487 expand n positions to n*(n-1)/2 baselines
00488
00489 Input Parameters:
00490 v measure (baseline, position or uvw measure)
00491
00492
00493 Output Parameters:
00494 _xyz uvw (quantity array)
00495
00496 --------------------------------------------------------------------------------
00497
00498 """
00499 return _measures.measures_expand(self, *args, **kwargs)
00500
00501 def earthmagnetic(self, *args, **kwargs):
00502 """
00503 earthmagnetic(self, rf=string("IGRF"), v0=initialize_variant(""), v1=initialize_variant(""), v2=initialize_variant(""),
00504 off=initialize_record("")) -> record *
00505
00506 Summary
00507 define an earthmagnetic measure
00508
00509 Input Parameters:
00510 rf reference code IGRF
00511 v0 Field strength
00512 v1 longitude
00513 v2 latitude
00514 off optional offset earthmagnetic measure
00515
00516 --------------------------------------------------------------------------------
00517
00518 """
00519 return _measures.measures_earthmagnetic(self, *args, **kwargs)
00520
00521 def baseline(self, *args, **kwargs):
00522 """
00523 baseline(self, rf=string("ITRF"), v0=initialize_variant(""), v1=initialize_variant(""), v2=initialize_variant(""),
00524 off=initialize_record("")) -> record *
00525
00526 Summary
00527 define a baseline measure
00528
00529 Input Parameters:
00530 rf reference code ITRF
00531 v0 longitude or x
00532 v1 latitude or y
00533 v2 height or z
00534 off optional offset baseline measure
00535
00536 --------------------------------------------------------------------------------
00537
00538 """
00539 return _measures.measures_baseline(self, *args, **kwargs)
00540
00541 def asbaseline(self, *args, **kwargs):
00542 """
00543 asbaseline(self, pos) -> record *
00544
00545 Summary
00546 define a baseline from a position measure
00547
00548 Input Parameters:
00549 pos position measure
00550
00551 --------------------------------------------------------------------------------
00552
00553 """
00554 return _measures.measures_asbaseline(self, *args, **kwargs)
00555
00556 def listcodes(self, *args, **kwargs):
00557 """
00558 listcodes(self, ms) -> record *
00559
00560 Summary
00561 get known reference codes
00562
00563 Input Parameters:
00564 ms the measure type for which to list
00565
00566 --------------------------------------------------------------------------------
00567
00568 """
00569 return _measures.measures_listcodes(self, *args, **kwargs)
00570
00571 def measure(self, *args, **kwargs):
00572 """
00573 measure(self, v, rf, off=initialize_record("")) -> record *
00574
00575 Summary
00576 convert a measure to another reference
00577
00578 Input Parameters:
00579 v measure to be converted
00580 rf output reference code
00581 off optional output offset measure
00582
00583 --------------------------------------------------------------------------------
00584
00585 """
00586 return _measures.measures_measure(self, *args, **kwargs)
00587
00588 def doframe(self, *args, **kwargs):
00589 """
00590 doframe(self, v) -> bool
00591
00592 Summary
00593 save a measure as frame reference
00594
00595 Input Parameters:
00596 v measure to be set in frame
00597
00598 --------------------------------------------------------------------------------
00599
00600 """
00601 return _measures.measures_doframe(self, *args, **kwargs)
00602
00603 def framenow(self):
00604 """
00605 framenow(self) -> bool
00606
00607 Summary
00608 set the active frame time at now
00609 --------------------------------------------------------------------------------
00610
00611 """
00612 return _measures.measures_framenow(self)
00613
00614 def showframe(self):
00615 """
00616 showframe(self) -> string
00617
00618 Summary
00619 show the currently active frame reference
00620 --------------------------------------------------------------------------------
00621
00622 """
00623 return _measures.measures_showframe(self)
00624
00625 def toradialvelocity(self, *args, **kwargs):
00626 """
00627 toradialvelocity(self, rf, v0) -> record *
00628
00629 Summary
00630 convert a doppler type value to a real
00631 radial velocity
00632
00633 Input Parameters:
00634 rf radial velocity reference type
00635 v0 doppler value measure
00636
00637 --------------------------------------------------------------------------------
00638
00639 """
00640 return _measures.measures_toradialvelocity(self, *args, **kwargs)
00641
00642 def tofrequency(self, *args, **kwargs):
00643 """
00644 tofrequency(self, rf, v0, rfq) -> record *
00645
00646 Summary
00647 convert a doppler type value to a frequency
00648
00649 Input Parameters:
00650 rf frequency reference type
00651 v0 doppler measure value
00652 rfq rest frequency (frequency measure or freuency quantity)
00653
00654 --------------------------------------------------------------------------------
00655
00656 """
00657 return _measures.measures_tofrequency(self, *args, **kwargs)
00658
00659 def todoppler(self, *args, **kwargs):
00660 """
00661 todoppler(self, rf, v0, rfq=initialize_variant("")) -> record *
00662
00663 Summary
00664 convert a frequency or radialvelocity measure
00665 to a doppler measure
00666
00667 Input Parameters:
00668 rf doppler reference type
00669 v0 radial velocity or frequency measure
00670 rfq rest frequency (frequency measure or frequency quantity)
00671
00672 --------------------------------------------------------------------------------
00673
00674 """
00675 return _measures.measures_todoppler(self, *args, **kwargs)
00676
00677 def torestfrequency(self, *args, **kwargs):
00678 """
00679 torestfrequency(self, v0, d0) -> record *
00680
00681 Summary
00682 convert a frequency and doppler measure
00683 to a rest frequency
00684
00685 Input Parameters:
00686 v0 frequency reference type
00687 d0 doppler measure value
00688
00689 --------------------------------------------------------------------------------
00690
00691 """
00692 return _measures.measures_torestfrequency(self, *args, **kwargs)
00693
00694 def rise(self, *args, **kwargs):
00695 """
00696 rise(self, crd=initialize_variant(""), ev=initialize_variant("0.0deg")) -> record *
00697
00698 Summary
00699 get rise and set sidereal time
00700
00701 Input Parameters:
00702 crd direction of source (direction measure)
00703 ev elevation angle limit 0.0deg
00704
00705 --------------------------------------------------------------------------------
00706
00707 """
00708 return _measures.measures_rise(self, *args, **kwargs)
00709
00710 def riseset(self, *args, **kwargs):
00711 """
00712 riseset(self, crd, ev=initialize_variant("0.0deg")) -> record *
00713
00714 Summary
00715 get rise and set times
00716
00717 Input Parameters:
00718 crd direction of source (direction measure)
00719 ev elevation limit 0.0deg
00720
00721 --------------------------------------------------------------------------------
00722
00723 """
00724 return _measures.measures_riseset(self, *args, **kwargs)
00725
00726 def posangle(self, *args, **kwargs):
00727 """
00728 posangle(self, m1, m2) -> record *
00729
00730 Summary
00731 get position angle of two directions
00732
00733 Input Parameters:
00734 m1 direction of source (direction measure)
00735 m2 direction of other source (direction measure)
00736
00737 --------------------------------------------------------------------------------
00738
00739 """
00740 return _measures.measures_posangle(self, *args, **kwargs)
00741
00742 def separation(self, *args, **kwargs):
00743 """
00744 separation(self, m1, m2) -> record *
00745
00746 Summary
00747 get separation angle between two directions
00748
00749 Input Parameters:
00750 m1 direction of source (direction measure)
00751 m2 direction of other source (direction measure)
00752
00753 --------------------------------------------------------------------------------
00754
00755 """
00756 return _measures.measures_separation(self, *args, **kwargs)
00757
00758 def addxvalue(self, *args, **kwargs):
00759 """
00760 addxvalue(self, a) -> record *
00761
00762 Summary
00763 get some additional measure information
00764
00765 Input Parameters:
00766 a measures for which extra information is to be gotten
00767
00768 --------------------------------------------------------------------------------
00769
00770 """
00771 return _measures.measures_addxvalue(self, *args, **kwargs)
00772
00773 def type(self):
00774 """
00775 type(self) -> string
00776
00777 Summary
00778 type of tool
00779 --------------------------------------------------------------------------------
00780
00781 """
00782 return _measures.measures_type(self)
00783
00784 def done(self):
00785 """
00786 done(self) -> bool
00787
00788 Summary
00789 free resources used by tool.
00790 --------------------------------------------------------------------------------
00791
00792 """
00793 return _measures.measures_done(self)
00794
00795 def ismeasure(self, *args, **kwargs):
00796 """
00797 ismeasure(self, v) -> bool
00798
00799 Summary
00800 Check if measure
00801
00802 Input Parameters:
00803 v value to be tested
00804
00805 --------------------------------------------------------------------------------
00806
00807 """
00808 return _measures.measures_ismeasure(self, *args, **kwargs)
00809
00810 measures_swigregister = _measures.measures_swigregister
00811 measures_swigregister(measures)
00812 cvar = _measures.cvar
00813
00814
00815
00816