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('_vpmanager', [dirname(__file__)])
00017 except ImportError:
00018 import _vpmanager
00019 return _vpmanager
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_vpmanager', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _vpmanager = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _vpmanager
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 vpmanager(_object):
00071 """Proxy of C++ casac::vpmanager class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, vpmanager, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, vpmanager, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> vpmanager"""
00079 this = _vpmanager.new_vpmanager()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _vpmanager.delete_vpmanager
00083 __del__ = lambda self : None;
00084 def release(self):
00085 """
00086 release(self)
00087
00088 Summary
00089 Release the VPManager for use by others.
00090 --------------------------------------------------------------------------------
00091
00092 """
00093 return _vpmanager.vpmanager_release(self)
00094
00095 def saveastable(self, *args, **kwargs):
00096 """
00097 saveastable(self, tablename=string("")) -> bool
00098
00099 Summary
00100 Save the vp or pb descriptions as a table
00101
00102 Input Parameters:
00103 tablename Name of table to save vp descriptions in
00104
00105 --------------------------------------------------------------------------------
00106
00107 """
00108 return _vpmanager.vpmanager_saveastable(self, *args, **kwargs)
00109
00110 def loadfromtable(self, *args, **kwargs):
00111 """
00112 loadfromtable(self, tablename=string("")) -> bool
00113
00114 Summary
00115 Load the vp or pb descriptions from a table (deleting all previous definitions)
00116
00117 Input Parameters:
00118 tablename Name of table to load vp descriptions from
00119
00120 --------------------------------------------------------------------------------
00121
00122 """
00123 return _vpmanager.vpmanager_loadfromtable(self, *args, **kwargs)
00124
00125 def summarizevps(self, verbose=False):
00126 """
00127 summarizevps(self, verbose=False) -> bool
00128
00129 Summary
00130 Summarize the currently accumulated VP descriptions
00131
00132 Input Parameters:
00133 verbose Print out full record? Otherwise, print summary. false
00134
00135 --------------------------------------------------------------------------------
00136
00137 """
00138 return _vpmanager.vpmanager_summarizevps(self, verbose)
00139
00140 def setcannedpb(self, *args, **kwargs):
00141 """
00142 setcannedpb(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, commonpb=string("DEFAULT"),
00143 dosquint=False, paincrement=initialize_variant("720deg"), usesymmetricbeam=False) -> record *
00144
00145 Summary
00146 Select a vp/pb from our library of common pb models
00147
00148 Input Parameters:
00149 telescope Which telescope in the MS will use this vp/pb? VLA
00150 othertelescope If telescope=='OTHER', specify name here
00151 dopb Should we apply the vp/pb to this telescope's data? true
00152 commonpb List of common vp/pb models: DEFAULT code figures it out DEFAULT
00153 dosquint Enable the natural beam squint found in the common vp model false
00154 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00155 usesymmetricbeam Not currently used false
00156
00157 --------------------------------------------------------------------------------
00158
00159 """
00160 return _vpmanager.vpmanager_setcannedpb(self, *args, **kwargs)
00161
00162 def setpbairy(self, *args, **kwargs):
00163 """
00164 setpbairy(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, dishdiam=initialize_variant("25.0m"),
00165 blockagediam=initialize_variant("2.5m"), maxrad=initialize_variant("0.8deg"),
00166 reffreq=initialize_variant("1.0GHz"), squintdir=initialize_variant(""),
00167 squintreffreq=initialize_variant("1.0GHz"), dosquint=False,
00168 paincrement=initialize_variant("720deg"), usesymmetricbeam=False) -> record *
00169
00170 Summary
00171 Make an airy disk vp
00172
00173 Input Parameters:
00174 telescope Which telescope in the MS will use this vp/pb? VLA
00175 othertelescope If telescope=='OTHER', specify name here
00176 dopb Should we apply the vp/pb to this telescope's data? true
00177 dishdiam Effective diameter of dish 25.0m
00178 blockagediam Effective diameter of subreflector blockage 2.5m
00179 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 0.8deg
00180 reffreq Frequency at which maxrad is specified 1.0GHz
00181 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00182 squintreffreq Frequency at which the squint is specified 1.0GHz
00183 dosquint Enable the natural beam squint found in the common vp model false
00184 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00185 usesymmetricbeam Not currently used false
00186
00187 --------------------------------------------------------------------------------
00188
00189 """
00190 return _vpmanager.vpmanager_setpbairy(self, *args, **kwargs)
00191
00192 def setpbcospoly(self, *args, **kwargs):
00193 """
00194 setpbcospoly(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, coeff=initialize_vector(1, (double)-1),
00195 scale=initialize_vector(1, (double)-1), maxrad=initialize_variant("0.8deg"),
00196 reffreq=initialize_variant("1.0GHz"), isthispb=string("PB"),
00197 squintdir=initialize_variant(""), squintreffreq=initialize_variant("1.0GHz"),
00198 dosquint=False, paincrement=initialize_variant("720deg"), usesymmetricbeam=False) -> record *
00199
00200 Summary
00201 Make a vp/pb from a polynomial of scaled cosines
00202
00203 Input Parameters:
00204 telescope Which telescope in the MS will use this vp/pb? VLA
00205 othertelescope If telescope=='OTHER', specify name here
00206 dopb Should we apply the vp/pb to this telescope's data? true
00207 coeff Vector of coefficients of cosines -1
00208 scale Vector of scale factors of cosines -1
00209 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 0.8deg
00210 reffreq Frequency at which maxrad is specified 1.0GHz
00211 isthispb Do these parameters describe a PB or a VP? PB
00212 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00213 squintreffreq Frequency at which the squint is specified 1.0GHz
00214 dosquint Enable the natural beam squint found in the common vp model false
00215 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00216 usesymmetricbeam Not currently used false
00217
00218 --------------------------------------------------------------------------------
00219
00220 """
00221 return _vpmanager.vpmanager_setpbcospoly(self, *args, **kwargs)
00222
00223 def setpbgauss(self, *args, **kwargs):
00224 """
00225 setpbgauss(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, halfwidth=initialize_variant("0.5deg"),
00226 maxrad=initialize_variant("1.0deg"), reffreq=initialize_variant("1.0GHz"),
00227 isthispb=string("PB"), squintdir=initialize_variant(""),
00228 squintreffreq=initialize_variant("1.0GHz"), dosquint=False, paincrement=initialize_variant("720deg"),
00229 usesymmetricbeam=False) -> record *
00230
00231 Summary
00232 Make a Gaussian vp/pb
00233
00234 Input Parameters:
00235 telescope Which telescope in the MS will use this vp/pb? VLA
00236 othertelescope If telescope=='OTHER', specify name here
00237 dopb Should we apply the vp/pb to this telescope's data? true
00238 halfwidth Half power half width of the Gaussian at the reffreq 0.5deg
00239 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 1.0deg
00240 reffreq Frequency at which maxrad is specified 1.0GHz
00241 isthispb Do these parameters describe a PB or a VP? PB
00242 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00243 squintreffreq Frequency at which the squint is specified 1.0GHz
00244 dosquint Enable the natural beam squint found in the common vp model false
00245 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00246 usesymmetricbeam Not currently used false
00247
00248 --------------------------------------------------------------------------------
00249
00250 """
00251 return _vpmanager.vpmanager_setpbgauss(self, *args, **kwargs)
00252
00253 def setpbinvpoly(self, *args, **kwargs):
00254 """
00255 setpbinvpoly(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, coeff=initialize_vector(1, (double)-1),
00256 maxrad=initialize_variant("0.8deg"), reffreq=initialize_variant("1.0GHz"),
00257 isthispb=string("PB"), squintdir=initialize_variant(""),
00258 squintreffreq=initialize_variant("1.0"), dosquint=False, paincrement=initialize_variant("720deg"),
00259 usesymmetricbeam=False) -> record *
00260
00261 Summary
00262 Make a vp/pb as an inverse polynomial
00263
00264 Input Parameters:
00265 telescope Which telescope in the MS will use this vp/pb? VLA
00266 othertelescope If telescope=='OTHER', specify name here
00267 dopb Should we apply the vp/pb to this telescope's data? true
00268 coeff Coefficients of even powered terms -1
00269 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 0.8deg
00270 reffreq Frequency at which maxrad is specified 1.0GHz
00271 isthispb Do these parameters describe a PB or a VP? PB
00272 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00273 squintreffreq Frequency at which the squint is specified 1.0
00274 dosquint Enable the natural beam squint found in the common vp model false
00275 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00276 usesymmetricbeam Not currently used false
00277
00278 --------------------------------------------------------------------------------
00279
00280 """
00281 return _vpmanager.vpmanager_setpbinvpoly(self, *args, **kwargs)
00282
00283 def setpbnumeric(self, *args, **kwargs):
00284 """
00285 setpbnumeric(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, vect=initialize_vector(1, (double)-1),
00286 maxrad=initialize_variant("0.8deg"), reffreq=initialize_variant("1.0GHz"),
00287 isthispb=string("PB"), squintdir=initialize_variant(""),
00288 squintreffreq=initialize_variant("1.0GHz"), dosquint=False, paincrement=initialize_variant("720deg"),
00289 usesymmetricbeam=False) -> record *
00290
00291 Summary
00292 Make a vp/pb from a user-supplied vector
00293
00294 Input Parameters:
00295 telescope Which telescope in the MS will use this vp/pb? VLA
00296 othertelescope If telescope=='OTHER', specify name here
00297 dopb Should we apply the vp/pb to this telescope's data? true
00298 vect Vector of vp/pb samples uniformly spaced from 0 to maxrad -1
00299 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 0.8deg
00300 reffreq Frequency at which maxrad is specified 1.0GHz
00301 isthispb Do these parameters describe a PB or a VP? PB
00302 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00303 squintreffreq Frequency at which the squint is specified 1.0GHz
00304 dosquint Enable the natural beam squint found in the common vp model false
00305 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720deg
00306 usesymmetricbeam Not currently used false
00307
00308 --------------------------------------------------------------------------------
00309
00310 """
00311 return _vpmanager.vpmanager_setpbnumeric(self, *args, **kwargs)
00312
00313 def setpbimage(self, *args, **kwargs):
00314 """
00315 setpbimage(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, realimage=string(""),
00316 imagimage=string(""), compleximage=string("")) -> record *
00317
00318 Summary
00319 Make a vp/pb from a user-supplied image
00320
00321 Input Parameters:
00322 telescope Which telescope in the MS will use this vp/pb? VLA
00323 othertelescope If telescope=='OTHER', specify name here
00324 dopb Should we apply the vp/pb to this telescope's data? true
00325 realimage Real part of vp as an image
00326 imagimage Imaginary part of vp as an image
00327 compleximage complex vp as an image of complex numbers; if specified realimage and imagimage are ignored
00328
00329 --------------------------------------------------------------------------------
00330
00331 """
00332 return _vpmanager.vpmanager_setpbimage(self, *args, **kwargs)
00333
00334 def setpbpoly(self, *args, **kwargs):
00335 """
00336 setpbpoly(self, telescope=string("VLA"), othertelescope=string(""), dopb=True, coeff=initialize_vector(1, (double)-1),
00337 maxrad=initialize_variant("0.8deg"), reffreq=initialize_variant("1.0GHz"),
00338 isthispb=string("PB"), squintdir=initialize_variant(""),
00339 squintreffreq=initialize_variant("1.0GHz"), dosquint=False, paincrement=initialize_variant("720"),
00340 usesymmetricbeam=False) -> record *
00341
00342 Summary
00343 Make a vp/pb from a polynomial
00344
00345 Input Parameters:
00346 telescope Which telescope in the MS will use this vp/pb? VLA
00347 othertelescope If telescope=='OTHER', specify name here
00348 dopb Should we apply the vp/pb to this telescope's data? true
00349 coeff Coefficients of even powered terms -1
00350 maxrad Maximum radial extent of the vp/pb (scales with 1/freq) 0.8deg
00351 reffreq Frequency at which maxrad is specified 1.0GHz
00352 isthispb Do these parameters describe a PB or a VP? PB
00353 squintdir Offset (Measure) of RR beam from pointing center, azel frame (scales with 1/freq)
00354 squintreffreq Frequency at which the squint is specified 1.0GHz
00355 dosquint Enable the natural beam squint found in the common vp model false
00356 paincrement Increment in Parallactic Angle for asymmetric (ie, squinted) vp application 720
00357 usesymmetricbeam Not currently used false
00358
00359 --------------------------------------------------------------------------------
00360
00361 """
00362 return _vpmanager.vpmanager_setpbpoly(self, *args, **kwargs)
00363
00364 def setpbantresptable(self, *args, **kwargs):
00365 """
00366 setpbantresptable(self, telescope=string(""), othertelescope=string(""), dopb=True, antresppath=string("")) -> bool
00367
00368 Summary
00369 Declare a reference to an antenna responses table
00370
00371 Input Parameters:
00372 telescope Which telescope in the MS will use this vp/pb?
00373 othertelescope If telescope=='OTHER', specify name here
00374 dopb Should we apply the vp/pb to this telescope's data? true
00375 antresppath The path to the antenna responses table (absolute or relative to CASA data dir.)
00376
00377 --------------------------------------------------------------------------------
00378
00379 """
00380 return _vpmanager.vpmanager_setpbantresptable(self, *args, **kwargs)
00381
00382 def reset(self):
00383 """
00384 reset(self) -> bool
00385
00386 Summary
00387 Reinitialize the VPManager (will erase all VPs and defaults defined on the command line)
00388 --------------------------------------------------------------------------------
00389
00390 """
00391 return _vpmanager.vpmanager_reset(self)
00392
00393 def setuserdefault(self, *args, **kwargs):
00394 """
00395 setuserdefault(self, vplistnum=-1, telescope=string(""), anttype=string("")) -> bool
00396
00397 Summary
00398 Select the VP which is to be used by the imager for the given telescope and antenna type
00399
00400 Input Parameters:
00401 vplistnum The number of the vp as displayed by summarizevps(), or -1 for internal default, or -2 for unset -1
00402 telescope Which telescope in the MS will use this vp/pb?
00403 anttype Which antennatype will use this vp/pb? Default: '' = all
00404
00405 --------------------------------------------------------------------------------
00406
00407 """
00408 return _vpmanager.vpmanager_setuserdefault(self, *args, **kwargs)
00409
00410 def getuserdefault(self, *args, **kwargs):
00411 """
00412 getuserdefault(self, telescope=string(""), anttype=string("")) -> int
00413
00414 Summary
00415 Get the vp list number of the present default VP/PB for the given parameters (-1 = internal PB, -2 = none)
00416
00417 Input Parameters:
00418 telescope Which telescope in the MS will use this vp/pb?
00419 anttype Which antennatype will use this vp/pb? Default: '' = all
00420
00421 --------------------------------------------------------------------------------
00422
00423 """
00424 return _vpmanager.vpmanager_getuserdefault(self, *args, **kwargs)
00425
00426 def getanttypes(self, *args, **kwargs):
00427 """
00428 getanttypes(self, telescope=string(""), obstime=initialize_variant(""), freq=initialize_variant(""),
00429 obsdirection=initialize_variant("AZEL 0deg 90deg")) -> std::vector< std::string >
00430
00431 Summary
00432 Return the list of available antenna types for the given parameters
00433
00434 Input Parameters:
00435 telescope Telescope name
00436 obstime Time of the observation (for versioning and reference frame calculations)
00437 freq Frequency of the observation (may include reference frame, default: LSRK)
00438 obsdirection Direction of the observation (may include reference frame, default: J2000). default: Zenith AZEL 0deg 90deg
00439
00440 --------------------------------------------------------------------------------
00441
00442 """
00443 return _vpmanager.vpmanager_getanttypes(self, *args, **kwargs)
00444
00445 def numvps(self, *args, **kwargs):
00446 """
00447 numvps(self, telescope=string(""), obstime=initialize_variant(""), freq=initialize_variant(""),
00448 obsdirection=initialize_variant("AZEL 0deg 90deg")) -> int
00449
00450 Summary
00451 Return the number of vps/pbs available for the given parameters
00452
00453 Input Parameters:
00454 telescope Telescope name
00455 obstime Time of the observation (for versioning and reference frame calculations)
00456 freq Frequency of the observation (may include reference frame, default: LSRK)
00457 obsdirection Direction of the observation (may include reference frame, default: J2000). default: Zenith AZEL 0deg 90deg
00458
00459 --------------------------------------------------------------------------------
00460
00461 """
00462 return _vpmanager.vpmanager_numvps(self, *args, **kwargs)
00463
00464 def getvp(self, *args, **kwargs):
00465 """
00466 getvp(self, telescope=string(""), antennatype=string(""), obstime=initialize_variant(""), freq=initialize_variant(""),
00467 obsdirection=initialize_variant("AZEL 0deg 90deg")) -> record *
00468
00469 Summary
00470 Return the default vps/pbs record for the given parameters
00471
00472 Input Parameters:
00473 telescope Telescope name
00474 antennatype The antenna type as a string, e.g. 'DV'
00475 obstime Time of the observation (for versioning and reference frame calculations), e.g. 2011/12/12T00:00:00
00476 freq Frequency of the observation (may include reference frame, default: LSRK)
00477 obsdirection Direction of the observation (may include reference frame, default: J2000), default: AZEL 0deg 90deg
00478
00479 --------------------------------------------------------------------------------
00480
00481 """
00482 return _vpmanager.vpmanager_getvp(self, *args, **kwargs)
00483
00484 def createantresp(self, *args, **kwargs):
00485 """
00486 createantresp(self, imdir=string(""), starttime=string(""), bandnames=std::vector< string >(1, ""), bandminfreq=std::vector< string >(1, ""),
00487 bandmaxfreq=std::vector< string >(1, "")) -> bool
00488
00489 Summary
00490 Create a standard-format AntennaResponses table
00491
00492 Input Parameters:
00493 imdir Path to the directory containing the response images
00494 starttime Time from which onwards the response is valid, format YYYY/MM/DD/hh:mm:ss
00495 bandnames List containing the names of the observatory's frequency bands
00496 bandminfreq List containing the lower edges of the observatory's frequency bands, e.g. ['80GHz','120GHz']
00497 bandmaxfreq List containing the upper edges of the observatory's frequency bands, e.g. ['120GHz','180GHz']
00498
00499 --------------------------------------------------------------------------------
00500
00501 """
00502 return _vpmanager.vpmanager_createantresp(self, *args, **kwargs)
00503
00504 def getrespimagename(self, *args, **kwargs):
00505 """
00506 getrespimagename(self, telescope=string(""), starttime=string(""), frequency=string(""), functype=string("ANY"),
00507 anttype=string(""), azimuth=string("0deg"), elevation=string("45deg"),
00508 rectype=string(""), beamnumber=0) -> string
00509
00510 Summary
00511 Get the image name for the given parameters from the given responses table
00512
00513 Input Parameters:
00514 telescope Which telescope is described by this response?
00515 starttime Time at which the response has to be valid, format YYYY/MM/DD/hh:mm:ss
00516 frequency The frequency at which the response has to be valid, e.g. '100GHz'
00517 functype Type of the responsefunction requested, e.g. 'EFP' ANY
00518 anttype Antenna type (observatory-dependent)
00519 azimuth Azimuth of the observation (at the location of the observatory, 0 is North), e.g. '5deg' 0deg
00520 elevation Elevation of the observation (at the location of the observatory, 0 is North), e.g. '60deg' 45deg
00521 rectype Receiver type (observatory-dependent)
00522 beamnumber Beam number (for the case of multiple beams per receiver) 0
00523
00524 --------------------------------------------------------------------------------
00525
00526 """
00527 return _vpmanager.vpmanager_getrespimagename(self, *args, **kwargs)
00528
00529 vpmanager_swigregister = _vpmanager.vpmanager_swigregister
00530 vpmanager_swigregister(vpmanager)
00531
00532
00533
00534