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('_calibrater', [dirname(__file__)])
00017 except ImportError:
00018 import _calibrater
00019 return _calibrater
00020 if fp is not None:
00021 try:
00022 _mod = imp.load_module('_calibrater', fp, pathname, description)
00023 finally:
00024 fp.close()
00025 return _mod
00026 _calibrater = swig_import_helper()
00027 del swig_import_helper
00028 else:
00029 import _calibrater
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 calibrater(_object):
00071 """Proxy of C++ casac::calibrater class"""
00072 __swig_setmethods__ = {}
00073 __setattr__ = lambda self, name, value: _swig_setattr(self, calibrater, name, value)
00074 __swig_getmethods__ = {}
00075 __getattr__ = lambda self, name: _swig_getattr(self, calibrater, name)
00076 __repr__ = _swig_repr
00077 def __init__(self):
00078 """__init__(self) -> calibrater"""
00079 this = _calibrater.new_calibrater()
00080 try: self.this.append(this)
00081 except: self.this = this
00082 __swig_destroy__ = _calibrater.delete_calibrater
00083 __del__ = lambda self : None;
00084 def open(self, *args, **kwargs):
00085 """
00086 open(self, filename, compress=False, addcorr=True, addmodel=True) -> bool
00087
00088 Summary
00089 Attach MeasurementSet to the calibrater tool
00090
00091 Input Parameters:
00092 filename MeasurementSet file name. No default
00093 compress Compress calibration columns? false
00094 addcorr Add scratch columns? true
00095 addmodel Add MODEL_DATA column along with CORRECTED_DATA ? true
00096
00097 --------------------------------------------------------------------------------
00098
00099 """
00100 return _calibrater.calibrater_open(self, *args, **kwargs)
00101
00102 def selectvis(self, *args, **kwargs):
00103 """
00104 selectvis(self, time=initialize_variant(""), spw=initialize_variant(""), scan=initialize_variant(""),
00105 field=initialize_variant(""), intent=initialize_variant(""), observation=initialize_variant(""),
00106 baseline=initialize_variant(""), uvrange=initialize_variant(""),
00107 chanmode=string("none"), nchan=1, start=0, step=1, mstart=Quantity(std::vector<double>(1, 0.0),"km/s"),
00108 mstep=Quantity(std::vector<double>(1, 0.0),"km/s"),
00109 msselect=string("")) -> bool
00110
00111 Summary
00112 Set the data selection for subsequent processing
00113
00114 Input Parameters:
00115 time Select on time
00116 spw Select on spectral window
00117 scan Select on scan
00118 field Select on field
00119 intent Select on intent or state
00120 observation Select by observation ID(s)
00121 baseline Select on antennas/baselines
00122 uvrange Select by uvrange
00123 chanmode Type of data selection: channel or velocity channel velocity none
00124 nchan Number of channels to select (mode='channel') 1
00125 start Start channel (0-relative) (mode='channel') 0
00126 step Step in channel number (mode='channel') 1
00127 mstart Start velocity (e.g. '20Km/s') 0.0
00128 mstep Step in velocity (e.g. '100m/s') 0.0
00129 msselect TAQL selection string. Default (empty) is no specific selection.
00130
00131 --------------------------------------------------------------------------------
00132
00133 """
00134 return _calibrater.calibrater_selectvis(self, *args, **kwargs)
00135
00136 def setmodel(self, *args, **kwargs):
00137 """
00138 setmodel(self, modelimage) -> bool
00139
00140 Summary
00141 Set the sky model used to compute the model visibilities
00142
00143 Input Parameters:
00144 modelimage Name of the model image.
00145
00146 --------------------------------------------------------------------------------
00147
00148 """
00149 return _calibrater.calibrater_setmodel(self, *args, **kwargs)
00150
00151 def setptmodel(self, *args, **kwargs):
00152 """
00153 setptmodel(self, stokes=initialize_vector(4,(double)0.0, (double)0.0, (double)0.0, (double)0.0)) -> bool
00154
00155 Summary
00156 Set the point source model Stokes parameters to be used to compute the model visibilities
00157
00158 Input Parameters:
00159 stokes Vector of Stokes parameters. 0.0 0.0 0.0 0.0
00160
00161 --------------------------------------------------------------------------------
00162
00163 """
00164 return _calibrater.calibrater_setptmodel(self, *args, **kwargs)
00165
00166 def setapply(self, *args, **kwargs):
00167 """
00168 setapply(self, type=string(""), t=0.0, table=string(""), field=initialize_variant(""), interp=string("linear"),
00169 select=string(""), calwt=False, spwmap=initialize_vector(1, (int)-1),
00170 opacity=initialize_vector(1, (double)0.0)) -> bool
00171
00172 Summary
00173 Arrange to apply calibration
00174
00175 Input Parameters:
00176 type Component type B BPOLY G GSPLINE D P T TOPAC GAINCURVE
00177 t Interpolation interval (seconds) 0.0
00178 table Calibration table name
00179 field Select on field
00180 interp Interpolation type (in time) aipslin nearest linear
00181 select TAQL selection string. Default is no selection.
00182 calwt Calibrate weights? false
00183 spwmap Spectral windows to apply -1
00184 opacity Array-wide zenith opacity per antenna (for type='TOPAC') 0.0
00185
00186 --------------------------------------------------------------------------------
00187
00188 """
00189 return _calibrater.calibrater_setapply(self, *args, **kwargs)
00190
00191 def setsolve(self, *args, **kwargs):
00192 """
00193 setsolve(self, type=string("MF"), t=initialize_variant(""), table=string(""), append=False, preavg=-1.0,
00194 phaseonly=False, apmode=string("AP"), refant=initialize_variant(""),
00195 minblperant=4, solnorm=False, minsnr=0.0, combine=string(""), fillgaps=0,
00196 cfcache=string(""), painc=360.0, fitorder=0) -> bool
00197
00198 Summary
00199 Arrange to solve for calibration
00200
00201 Input Parameters:
00202 type Component type G T B D M MF
00203 t Solution interval (units optional)
00204 table Output calibration table name
00205 append Append to existing table? false
00206 preavg Pre-averaging interval (in sec) -1.0
00207 phaseonly Solve only for phase? false
00208 apmode Solve for 'AP', 'A' (amp-only) or 'P' (phase-only) AP
00209 refant Reference antenna. Default is none.
00210 minblperant Minimum number of baselines per ant for solving 4
00211 solnorm Normalize solution after solve false
00212 minsnr SNR threshold for accepting solutions 0.0
00213 combine Data axes on which to combine solving (scan, spw, and/or field)
00214 fillgaps 0
00215 cfcache Name of the directory to be used for convolution function disk cache. This is used when type=EP.
00216 painc Parallactic Angle increment used to trigger computation of a new convolution function. This is used when type=EP. Default value implies that only one convolution function will be computed for the entire range of observation. 360.0
00217 fitorder Order of the polynomial fit, used when type='A'. 0
00218
00219 --------------------------------------------------------------------------------
00220
00221 """
00222 return _calibrater.calibrater_setsolve(self, *args, **kwargs)
00223
00224 def setsolvegainspline(self, *args, **kwargs):
00225 """
00226 setsolvegainspline(self, table=string(""), append=False, mode=string("PHAS"), splinetime=10800, preavg=0.0,
00227 npointaver=10, phasewrap=250, refant=initialize_variant("")) -> bool
00228
00229 Summary
00230 Specialization of setsolve for
00231 cubic spline G (time-dependent gain) solving
00232
00233 Input Parameters:
00234 table Output calibration table name
00235 append Append to existing table? false
00236 mode Phase or Amplitude mode? AMP PHASAMP PHAS
00237 splinetime Spline timescale (sec) 10800
00238 preavg Pre-averaging interval (in sec) 0.0
00239 npointaver 10
00240 phasewrap 250
00241 refant Reference antenna. Default is none.
00242
00243 --------------------------------------------------------------------------------
00244
00245 """
00246 return _calibrater.calibrater_setsolvegainspline(self, *args, **kwargs)
00247
00248 def setsolvebandpoly(self, *args, **kwargs):
00249 """
00250 setsolvebandpoly(self, table=string(""), append=False, t=initialize_variant(""), combine=string(""), degamp=3,
00251 degphase=3, visnorm=False, solnorm=True, maskcenter=0, maskedge=5.0,
00252 refant=initialize_variant("")) -> bool
00253
00254 Summary
00255 Specialization of setsolve for
00256 polynomial B (bandpass) solving
00257
00258 Input Parameters:
00259 table Output calibration table name
00260 append Append to existing table? false
00261 t Solution interval (units optional)
00262 combine Data axes on which to combine solving (scan, spw, and/or field)
00263 degamp Polynomial degree for amplitude solution 3
00264 degphase Polynomial degree for phase solution 3
00265 visnorm Normalize data prior to solution false
00266 solnorm Normalize result? true
00267 maskcenter Number of channels to avoid in center of each band 0
00268 maskedge Fraction of channels to avoid at each band edge (in \%) 5.0
00269 refant Reference antenna
00270
00271 --------------------------------------------------------------------------------
00272
00273 """
00274 return _calibrater.calibrater_setsolvebandpoly(self, *args, **kwargs)
00275
00276 def state(self):
00277 """
00278 state(self) -> bool
00279
00280 Summary
00281 Request the apply/solve state of the calibrater tool
00282 --------------------------------------------------------------------------------
00283
00284 """
00285 return _calibrater.calibrater_state(self)
00286
00287 def reset(self, apply=True, solve=True):
00288 """
00289 reset(self, apply=True, solve=True) -> bool
00290
00291 Summary
00292 Reset the selected apply and/or solve components
00293
00294 Input Parameters:
00295 apply If true, unset all apply settings true
00296 solve If true, unset all solve settings true
00297
00298 --------------------------------------------------------------------------------
00299
00300 """
00301 return _calibrater.calibrater_reset(self, apply, solve)
00302
00303 def initcalset(self, calset=0):
00304 """
00305 initcalset(self, calset=0) -> bool
00306
00307 Summary
00308 Re-initialize the calibration scratch columns.
00309
00310 Input Parameters:
00311 calset if it set to 1 the model saved in the header is removed 0
00312
00313 --------------------------------------------------------------------------------
00314
00315 """
00316 return _calibrater.calibrater_initcalset(self, calset)
00317
00318 def delmod(self, *args, **kwargs):
00319 """
00320 delmod(self, otf=False, field=initialize_variant(""), scr=False) -> bool
00321
00322 Summary
00323 Delete model data representations in the MS.
00324
00325 Input Parameters:
00326 otf If T, delete the otf model data keywords false
00327 field Select on field
00328 scr If T, delete the MODEL_DATA column false
00329
00330 --------------------------------------------------------------------------------
00331
00332 """
00333 return _calibrater.calibrater_delmod(self, *args, **kwargs)
00334
00335 def solve(self):
00336 """
00337 solve(self) -> bool
00338
00339 Summary
00340 Solve for the selected calibration components
00341 --------------------------------------------------------------------------------
00342
00343 """
00344 return _calibrater.calibrater_solve(self)
00345
00346 def correct(self, *args, **kwargs):
00347 """
00348 correct(self, applymode=string("")) -> bool
00349
00350 Summary
00351 Apply calibration information
00352
00353 Input Parameters:
00354 applymode Correction cal/flag mode: ''='calflag','cal','flag','trial'
00355
00356 --------------------------------------------------------------------------------
00357
00358 """
00359 return _calibrater.calibrater_correct(self, *args, **kwargs)
00360
00361 def corrupt(self):
00362 """
00363 corrupt(self) -> bool
00364
00365 Summary
00366 Corrupt model with calibration tables
00367 --------------------------------------------------------------------------------
00368
00369 """
00370 return _calibrater.calibrater_corrupt(self)
00371
00372 def fluxscale(self, *args, **kwargs):
00373 """
00374 fluxscale(self, tablein, reference=initialize_variant(""), tableout=string(""), transfer=initialize_variant(""),
00375 listfile=string(""), append=False, refspwmap=initialize_vector(1, (int)-1),
00376 incremental=False) -> record *
00377
00378 Summary
00379 Bootstrap the flux density scale from standard calibrators
00380
00381 Input Parameters:
00382 tablein Input calibration table name
00383 reference Reference calibrator field names (comma-separated)
00384 tableout Output calibration table name. Default is input calibration table name.
00385 transfer Transfer source field names (comma-separated). Default is all other fields.
00386 listfile Name of listfile that contains the fit information. Default is '' (no file).
00387 append Append to existing table? false
00388 refspwmap List of alternate spw for referencing -1
00389 incremental create a incremental caltable false
00390
00391 --------------------------------------------------------------------------------
00392
00393 """
00394 return _calibrater.calibrater_fluxscale(self, *args, **kwargs)
00395
00396 def accumulate(self, *args, **kwargs):
00397 """
00398 accumulate(self, tablein=string(""), incrtable=string(""), tableout=string(""), field=initialize_variant(""),
00399 calfield=initialize_variant(""), interp=string("linear"), t=-1.0,
00400 spwmap=initialize_vector(1, (int)-1)) -> bool
00401
00402 Summary
00403 Accumulate incremental calibration
00404 solutions into a cumulative calibration table
00405
00406 Input Parameters:
00407 tablein Input cumulative calibration table name
00408 incrtable Input incremental calibration table name
00409 tableout Output cumulative calibration table name. Default is input table name.
00410 field List of fields (names) to update in input cumulative table. Default is all.
00411 calfield List of fields (names) in incremental table to use. Default is use all.
00412 interp Interpolation mode to use on incremental solutions linear
00413 t Cumulative table timescale when creating from scratch -1.0
00414 spwmap Spectral windows to apply -1
00415
00416 --------------------------------------------------------------------------------
00417
00418 """
00419 return _calibrater.calibrater_accumulate(self, *args, **kwargs)
00420
00421 def activityrec(self):
00422 """
00423 activityrec(self) -> record *
00424
00425 Summary
00426 Returns a record containing properties of recent activity
00427 --------------------------------------------------------------------------------
00428
00429 """
00430 return _calibrater.calibrater_activityrec(self)
00431
00432 def specifycal(self, *args, **kwargs):
00433 """
00434 specifycal(self, caltable=string(""), time=string(""), spw=string(""), antenna=string(""), pol=string(""),
00435 caltype=string(""), parameter=initialize_vector(1, (double)1.0)) -> bool
00436
00437 Summary
00438 Externally specify calibration
00439 of various types
00440
00441 Input Parameters:
00442 caltable The calibration table name
00443 time Calibration timestamp
00444 spw Calibration spw(s)
00445 antenna Calibration antenna(s)
00446 pol Calibration polarization
00447 caltype Calibration timestamp
00448 parameter Calibration parameters 1.0
00449
00450 --------------------------------------------------------------------------------
00451
00452 """
00453 return _calibrater.calibrater_specifycal(self, *args, **kwargs)
00454
00455 def smooth(self, *args, **kwargs):
00456 """
00457 smooth(self, tablein, tableout, field=initialize_variant(""), smoothtype=string("median"), smoothtime=60.0) -> bool
00458
00459 Summary
00460 Produce a smoothed calibration table
00461
00462 Input Parameters:
00463 tablein Input calibration table
00464 tableout Output calibration table
00465 field Limit smoothing to these fields (default is all fields)
00466 smoothtype The smoothing type: 'mean' or 'median' mean median
00467 smoothtime Smoothing filter time constant (sec) 60.0
00468
00469 --------------------------------------------------------------------------------
00470
00471 """
00472 return _calibrater.calibrater_smooth(self, *args, **kwargs)
00473
00474 def listcal(self, *args, **kwargs):
00475 """
00476 listcal(self, caltable, field=initialize_variant(""), antenna=initialize_variant(""), spw=initialize_variant(""),
00477 listfile=string(""), pagerows=50) -> bool
00478
00479 Summary
00480 List the contents of a calibration table
00481
00482
00483 Input Parameters:
00484 caltable Calibration table to list
00485 field Field names or indices to list: ''==>all
00486 antenna Antenna/Baseline to list: ''==>all
00487 spw Spectral windows and channels: ''==>all, spw='10:8~20'
00488 listfile Send output to file: ''==>send to terminal)
00489 pagerows Rows per page 50
00490
00491 --------------------------------------------------------------------------------
00492
00493 """
00494 return _calibrater.calibrater_listcal(self, *args, **kwargs)
00495
00496 def posangcal(self, *args, **kwargs):
00497 """
00498 posangcal(self, posangcor, tablein, tableout=string("")) -> bool
00499
00500 Summary
00501 Apply position angle calibration to an existing cal table
00502
00503 Input Parameters:
00504 posangcor Position angle corrections (degrees)
00505 tablein Input calibration table name
00506 tableout Output calibration table name. Default is input table name.
00507
00508 --------------------------------------------------------------------------------
00509
00510 """
00511 return _calibrater.calibrater_posangcal(self, *args, **kwargs)
00512
00513 def linpolcor(self, *args, **kwargs):
00514 """
00515 linpolcor(self, tablein=string(""), tableout=string(""), fields=std::vector< string >(1, "")) -> bool
00516
00517 Summary
00518 Correct the gain table for linear polarization of the calibrator
00519
00520 Input Parameters:
00521 tablein Input calibration table name
00522 tableout Output calibration table name
00523 fields Calibrator field names
00524
00525 --------------------------------------------------------------------------------
00526
00527 """
00528 return _calibrater.calibrater_linpolcor(self, *args, **kwargs)
00529
00530 def plotcal(self, *args, **kwargs):
00531 """
00532 plotcal(self, antennas, fields, spwids, plottype=string("AMP"), tablename=string(""), polarization=1,
00533 multiplot=False, nx=1, ny=1, psfile=string("")) -> bool
00534
00535 Summary
00536 Plot a calibration table
00537
00538 Input Parameters:
00539 antennas Antennas to plot. Default is none.
00540 fields Fields to plot. Default is none.
00541 spwids Spectral windows id.'s to plot. Default is none.
00542 plottype Plot type 1/AMP PHASE RLPHASE XYPHASE RI DAMP DPHASE DRI FIT FITWGT TOTALFIT AMP
00543 tablename Calibration table name
00544 polarization Polarization to plot 1
00545 multiplot Turn on separate antenna plots false
00546 nx If multiplot=T, number of plots on horizontal axis 1
00547 ny If multiplot=T, number of plots on vertical axis 1
00548 psfile Name of output PostScript file to write plot to. Default is to send plot to the screen.
00549
00550 --------------------------------------------------------------------------------
00551
00552 """
00553 return _calibrater.calibrater_plotcal(self, *args, **kwargs)
00554
00555 def modelfit(self, *args, **kwargs):
00556 """
00557 modelfit(self, vary, niter=0, compshape=string("P"), par=initialize_vector(3,(double)1.0, (double)0.0, (double)0.0),
00558 file=string("")) -> std::vector< double >
00559
00560 Summary
00561 Model fitting
00562
00563 Input Parameters:
00564 vary If specified where T, let this parameter (in par) vary in fit
00565 niter Number of non-linear fitting iterations 0
00566 compshape Component shape, P=point G=gaussian P
00567 par Initial guess for fit parameters (default is for 'P)'I flux, rel RA, rel Dec, 1,0, 0.0, 0.0 are defaults 1.0 0.0 0.0
00568 file If specified, output componentslist file name, if empty don't write componentslist file
00569
00570 --------------------------------------------------------------------------------
00571
00572 """
00573 return _calibrater.calibrater_modelfit(self, *args, **kwargs)
00574
00575 def close(self):
00576 """
00577 close(self) -> bool
00578
00579 Summary
00580 Close the calibrater tool
00581 --------------------------------------------------------------------------------
00582
00583 """
00584 return _calibrater.calibrater_close(self)
00585
00586 def done(self):
00587 """
00588 done(self) -> bool
00589
00590 Summary
00591 Destroy the calibrater tool
00592 --------------------------------------------------------------------------------
00593
00594 """
00595 return _calibrater.calibrater_done(self)
00596
00597 calibrater_swigregister = _calibrater.calibrater_swigregister
00598 calibrater_swigregister(calibrater)
00599
00600
00601
00602