casa
$Rev:20696$
|
00001 # 00002 # This file was generated using xslt from its XML file 00003 # 00004 # Copyright 2008, Associated Universities Inc., Washington DC 00005 # 00006 import sys 00007 import os 00008 from casac import * 00009 import string 00010 import time 00011 import inspect 00012 import gc 00013 import numpy 00014 from odict import odict 00015 from task_bandpass import bandpass 00016 from task_bandpass import casalog 00017 00018 class bandpass_pg_: 00019 __name__ = "bandpass" 00020 00021 def __init__(self) : 00022 self.__bases__ = (bandpass_pg_,) 00023 self.__doc__ = self.__call__.__doc__ 00024 00025 00026 def __call__(self, vis=None, caltable=None, field=None, spw=None, intent=None, selectdata=None, timerange=None, uvrange=None, antenna=None, scan=None, observation=None, msselect=None, solint=None, combine=None, refant=None, minblperant=None, minsnr=None, solnorm=None, bandtype=None, smodel=None, append=None, fillgaps=None, degamp=None, degphase=None, visnorm=None, maskcenter=None, maskedge=None, gaintable=None, gainfield=None, interp=None, spwmap=None, gaincurve=None, opacity=None, parang=None, async=None): 00027 00028 """Calculates a bandpass calibration solution 00029 00030 Determines the amplitude and phase as a function of frequency for 00031 each spectral window containing more than one channel. Strong sources 00032 (or many observations of moderately strong sources) are needed to obtain 00033 accurate bandpass functions. The two solution choices are: Individual 00034 antenna/based channel solutions 'B'; and a polynomial fit over the channels 00035 'BPOLY'. The 'B' solutions can determined at any specified time interval, and 00036 is recommended if each channel has good signal-to-noise. Other, 'BPOLY' is 00037 recommended. 00038 00039 Keyword arguments: 00040 vis -- Name of input visibility file 00041 default: none; example: vis='ngc5921.ms' 00042 caltable -- Name of output bandpass calibration table 00043 default: none; example: caltable='ngc5921.bcal' 00044 00045 --- Data Selection (see help par.selectdata for more detailed information) 00046 00047 field -- Select field using field id(s) or field name(s). 00048 [run listobs to obtain the list id's or names] 00049 default: ''=all fields 00050 If field string is a non-negative integer, it is assumed a field index 00051 otherwise, it is assumed a field name 00052 field='0~2'; field ids 0,1,2 00053 field='0,4,5~7'; field ids 0,4,5,6,7 00054 field='3C286,3C295'; field named 3C286 adn 3C295 00055 field = '3,4C*'; field id 3, all names starting with 4C 00056 spw -- Select spectral window/channels 00057 default: ''=all spectral windows and channels 00058 spw='0~2,4'; spectral windows 0,1,2,4 (all channels) 00059 spw='<2'; spectral windows less than 2 (i.e. 0,1) 00060 spw='0:5~61'; spw 0, channels 5 to 61 00061 spw='0,10,3:3~45'; spw 0,10 all channels, spw 3, channels 3 to 45. 00062 spw='0~2:2:6'; spw 0,1,2 with channels 2 through 6 in each. 00063 spw='0:0~10;15~60'; spectral window 0 with channels 0-10,15-60 00064 NOTE: ';' to separate channel selections 00065 spw='0:0~10,1:20~30,2:1;2;3'; spw 0, channels 0-10, 00066 spw 1, channels 20-30, and spw 2, channels, 1,2 and 3 00067 intent -- Select observing intent 00068 default: '' (no selection by intent) 00069 intent='*BANDPASS*' (selects data labelled with 00070 BANDPASS intent) 00071 selectdata -- Other data selection parameters 00072 default: True 00073 timerange -- Select data based on time range: 00074 default = '' (all); examples, 00075 timerange = 'YYYY/MM/DD/hh:mm:ss~YYYY/MM/DD/hh:mm:ss' 00076 Note: if YYYY/MM/DD is missing dat defaults to first day in data set 00077 timerange='09:14:0~09:54:0' picks 40 min on first day 00078 timerange= '25:00:00~27:30:00' picks 1 hr to 3 hr 30min on next day 00079 timerange='09:44:00' data within one integration of time 00080 timerange='>10:24:00' data after this time 00081 uvrange -- Select data within uvrange (default meters) 00082 default: '' (all); example: 00083 uvrange='0~1000kl'; uvrange from 0-1000 kilo-lamgda 00084 uvrange='>4kl';uvranges greater than 4 kilo-lambda 00085 antenna -- Select data based on antenna/baseline 00086 default: '' (all) 00087 If antenna string is a non-negative integer, it is assumed an antenna index 00088 otherwise, it is assumed as an antenna name 00089 antenna='5&6'; baseline between antenna index 5 and index 6. 00090 antenna='VA05&VA06'; baseline between VLA antenna 5 and 6. 00091 antenna='5&6;7&8'; baseline 5-6 and 7-8 00092 antenna='5'; all baselines with antenna 5 00093 antenna='5,6,10'; all baselines with antennas 5, 6 and 10 00094 scan -- Select data based on scan number - New, under developement 00095 default: '' (all); example: scan='>3' 00096 observation -- Observation ID(s). 00097 default: '' = all 00098 example: '0~2,4' 00099 msselect -- Optional complex data selection (ignore for now) 00100 00101 --- Solution parameters 00102 solint -- Solution interval in time (units optional), and (optionally) 00103 in frequency. Frequency pre-averaging can be 00104 specified after a comma in units of channels or Hz. 00105 If nothing is specified for frequency, no freq pre-averaging 00106 will be done. 00107 default: 'inf' (~infinite, up to boundaries controlled by combine, 00108 with no pre-averaging in frequency) 00109 Options for time: 'inf' (~infinite), 'int' (per integration), any float 00110 or integer value with or without units 00111 Options for freq: an integer with 'ch' suffix will enforce 00112 pre-averaging by the specified number 00113 of channels. 00114 a numeric value suffixed with frequency 00115 units (e.g., 'Hz','kHz','MHz') will enforce 00116 pre-averaging by an integral number of 00117 channels amounting to no more than the 00118 specified bandwidth 00119 examples: solint='1min'; solint='60s', solint=60 --> 1 minute 00120 solint='0s'; solint=0; solint='int' --> per integration 00121 solint='-1s'; solint='inf' --> ~infinite, up to boundaries 00122 enforced by combine 00123 solint='inf,8Mhz' --> ~infinite in time, with 00124 8MHz pre-average in freq 00125 solint='int,32ch' --> per-integration in time, 00126 with 32-channel pre-average 00127 in freq 00128 combine -- Data axes to combine for solving 00129 default: 'scan' --> solutions will break at field and spw boundaries, 00130 but may extend over multiple scans (per field and spw) up 00131 to solint. 00132 Options: '','scan','spw',field', or any comma-separated combination 00133 example: combine='scan,spw' --> extend solutions over scan boundaries 00134 (up to the solint), and combine spws for solving 00135 refant -- Reference antenna name(s); a prioritized list may be specified 00136 default: '' (no reference antenna) 00137 example: refant='13' (antenna with index 13) 00138 refant='VA04' (VLA antenna #4) 00139 refant='EA02,EA23,EA13' (EVLA antenna EA02, use 00140 EA23 and EA13 as alternates if/when EA02 00141 drops out) 00142 Use 'go listobs' for antenna listing 00143 minblperant -- Minimum number of baselines required per antenna for each solve 00144 Antennas with fewer baaselines are excluded from solutions. Amplitude 00145 solutions with fewer than 4 baselines, and phase solutions with fewer 00146 than 3 baselines are only trivially constrained, and are no better 00147 than baseline-based solutions. 00148 default: 4 00149 example: minblperant=10 => Antennas participating on 10 or more 00150 baselines are included in the solve 00151 minsnr -- Reject solutions below this SNR (only applies for bandtype = B) 00152 default: 3.0 00153 solnorm -- Normalize bandpass amplitudes and phase for each 00154 spw, pol, ant, and timestamp 00155 default: False (no normalization) 00156 bandtype -- Type of bandpass solution (B or BPOLY) 00157 default: 'B'; example: bandtype='BPOLY' 00158 'B' does a channel by channel solution for each 00159 specified spw. 00160 'BPOLY' is somewhat experimental. It will fit an 00161 nth order polynomial for the amplitude and phase 00162 as a function of frequency. Only one fit is made 00163 for all specified spw, and edge channels should be 00164 omitted. 00165 Use taskname=plotcal in order to compare the results from 00166 B and BPOLY. 00167 fillgaps -- Fill flagged solution channels by interpolation 00168 default: 0 (don't interpolate) 00169 example: fillgaps=3 (interpolate gaps 3 channels wide and narrower) 00170 degamp -- Polynomial degree for BPOLY amplitude solution 00171 default: 3; example: degamp=2 00172 degphase -- Polynomial degree for BPOLY phase solution 00173 default: 3; example: degphase=2 00174 visnorm -- Normalize data prior to BPOLY solution 00175 default: False; example: visnorm=True 00176 maskcenter -- Number of channels to avoid in center of each band 00177 default: 0; example: maskcenter=5 (BPOLY only) 00178 maskedge -- Fraction of channels to avoid at each band edge (in %) 00179 default: 5; example: maskedge=3 (BPOLY only) 00180 append -- Append solutions to the (existing) table 00181 default: False; example: append=True 00182 00183 --- Other calibrations to apply on the fly before determining bandpass solution 00184 00185 gaintable -- Gain calibration table(s) to apply 00186 default: '' (none); 00187 examples: gaintable='ngc5921.gcal' 00188 gaintable=['ngc5921.ampcal','ngc5921.phcal'] 00189 gainfield -- Select a subset of calibrators from gaintable(s) 00190 default:'' ==> all sources in table; 00191 'nearest' ==> nearest (on sky) available field in table 00192 otherwise, same syntax as field 00193 example: gainfield='0~3' 00194 gainfield=['0~3','4~6'] 00195 interp -- Interpolation type (in time[,freq]) to use for each gaintable. 00196 When frequency interpolation is relevant (B, Df, Xf), 00197 separate time-dependent and freq-dependent interp 00198 types with a comma (freq _after_ the comma). 00199 Specifications for frequency are ignored when the 00200 calibration table has no channel-dependence. 00201 Time-dependent interp options ending in 'PD' enable a 00202 "phase delay" correction per spw for non-channel-dependent 00203 calibration types. 00204 default: '' --> 'linear,linear' for all gaintable(s) 00205 example: interp='nearest' (in time, freq-dep will be 00206 linear, if relevant) 00207 interp='linear,cubic' (linear in time, cubic 00208 in freq) 00209 interp=',spline' (spline in freq; linear in 00210 time by default) 00211 interp=['nearest,spline','linear'] (for multiple gaintables) 00212 Options: Time: 'nearest', 'linear' 00213 Freq: 'nearest', 'linear', 'cubic', 'spline' 00214 spwmap -- Spectral windows combinations to form for gaintable(s) 00215 default: [] (apply solutions from each spw to that spw only) 00216 Example: spwmap=[0,0,1,1] means apply the caltable solutions 00217 from spw = 0 to the spw 0,1 and spw 1 to spw 2,3. 00218 spwmap=[[0,0,1,1],[0,1,0,1]] 00219 gaincurve -- Apply internal VLA antenna gain curve correction (True/False) 00220 default: False; 00221 Use gaincurve=True ONLY for VLA data 00222 opacity -- Opacity correction to apply (nepers), per spw 00223 default: [] (no opacity correction for any spw) 00224 examples: 00225 A global value for all spws: 00226 opacity=0.051 00227 Different values for spws 0,1,2: 00228 opacity=[0.051, 0.055, 0.057] 00229 (if more than 3 spws, spw 3 and higher will 00230 be assigned the last specified value, or 0.057) 00231 Typical VLA values are: 5 GHz - 0.013, 8 GHz - 0.013 00232 15 GHz - 0.016, 23 GHz - 0.051, 43 GHz - 0.07 00233 parang -- If True, apply the parallactic angle correction (required 00234 for polarization calibration) 00235 default: False 00236 00237 00238 """ 00239 a=inspect.stack() 00240 stacklevel=0 00241 for k in range(len(a)): 00242 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00243 stacklevel=k 00244 break 00245 myf=sys._getframe(stacklevel).f_globals 00246 myf['__last_task'] = 'bandpass' 00247 myf['taskname'] = 'bandpass' 00248 ### 00249 myf['update_params'](func=myf['taskname'],printtext=False) 00250 ### 00251 ### 00252 #Handle globals or user over-ride of arguments 00253 # 00254 function_signature_defaults=dict(zip(self.__call__.func_code.co_varnames,self.__call__.func_defaults)) 00255 useLocalDefaults = False 00256 00257 for item in function_signature_defaults.iteritems(): 00258 key,val = item 00259 keyVal = eval(key) 00260 if (keyVal == None): 00261 #user hasn't set it - use global/default 00262 pass 00263 else: 00264 #user has set it - use over-ride 00265 if (key != 'self') : 00266 useLocalDefaults = True 00267 #myf[key]=keyVal 00268 00269 myparams = {} 00270 if useLocalDefaults : 00271 for item in function_signature_defaults.iteritems(): 00272 key,val = item 00273 keyVal = eval(key) 00274 exec('myparams[key] = keyVal') 00275 if (keyVal == None): 00276 exec('myparams[key] = '+ key + ' = self.itsdefault(key)') 00277 keyVal = eval(key) 00278 if(type(keyVal) == dict) : 00279 exec('myparams[key] = ' + key + ' = keyVal[len(keyVal)-1][\'value\']') 00280 00281 else : 00282 uselessvariable = None 00283 myparams['vis'] = vis = myf['vis'] 00284 myparams['caltable'] = caltable = myf['caltable'] 00285 myparams['field'] = field = myf['field'] 00286 myparams['spw'] = spw = myf['spw'] 00287 myparams['intent'] = intent = myf['intent'] 00288 myparams['selectdata'] = selectdata = myf['selectdata'] 00289 myparams['timerange'] = timerange = myf['timerange'] 00290 myparams['uvrange'] = uvrange = myf['uvrange'] 00291 myparams['antenna'] = antenna = myf['antenna'] 00292 myparams['scan'] = scan = myf['scan'] 00293 myparams['observation'] = observation = myf['observation'] 00294 myparams['msselect'] = msselect = myf['msselect'] 00295 myparams['solint'] = solint = myf['solint'] 00296 myparams['combine'] = combine = myf['combine'] 00297 myparams['refant'] = refant = myf['refant'] 00298 myparams['minblperant'] = minblperant = myf['minblperant'] 00299 myparams['minsnr'] = minsnr = myf['minsnr'] 00300 myparams['solnorm'] = solnorm = myf['solnorm'] 00301 myparams['bandtype'] = bandtype = myf['bandtype'] 00302 myparams['smodel'] = smodel = myf['smodel'] 00303 myparams['append'] = append = myf['append'] 00304 myparams['fillgaps'] = fillgaps = myf['fillgaps'] 00305 myparams['degamp'] = degamp = myf['degamp'] 00306 myparams['degphase'] = degphase = myf['degphase'] 00307 myparams['visnorm'] = visnorm = myf['visnorm'] 00308 myparams['maskcenter'] = maskcenter = myf['maskcenter'] 00309 myparams['maskedge'] = maskedge = myf['maskedge'] 00310 myparams['gaintable'] = gaintable = myf['gaintable'] 00311 myparams['gainfield'] = gainfield = myf['gainfield'] 00312 myparams['interp'] = interp = myf['interp'] 00313 myparams['spwmap'] = spwmap = myf['spwmap'] 00314 myparams['gaincurve'] = gaincurve = myf['gaincurve'] 00315 myparams['opacity'] = opacity = myf['opacity'] 00316 myparams['parang'] = parang = myf['parang'] 00317 00318 if type(smodel)==float: smodel=[smodel] 00319 if type(gaintable)==str: gaintable=[gaintable] 00320 if type(gainfield)==str: gainfield=[gainfield] 00321 if type(interp)==str: interp=[interp] 00322 if type(spwmap)==int: spwmap=[spwmap] 00323 if type(opacity)==float: opacity=[opacity] 00324 00325 result = None 00326 00327 # 00328 # The following is work around to avoid a bug with current python translation 00329 # 00330 mytmp = {} 00331 00332 mytmp['vis'] = vis 00333 mytmp['caltable'] = caltable 00334 mytmp['field'] = field 00335 mytmp['spw'] = spw 00336 mytmp['intent'] = intent 00337 mytmp['selectdata'] = selectdata 00338 mytmp['timerange'] = timerange 00339 mytmp['uvrange'] = uvrange 00340 mytmp['antenna'] = antenna 00341 mytmp['scan'] = scan 00342 mytmp['observation'] = observation 00343 mytmp['msselect'] = msselect 00344 mytmp['solint'] = solint 00345 mytmp['combine'] = combine 00346 mytmp['refant'] = refant 00347 mytmp['minblperant'] = minblperant 00348 mytmp['minsnr'] = minsnr 00349 mytmp['solnorm'] = solnorm 00350 mytmp['bandtype'] = bandtype 00351 mytmp['smodel'] = smodel 00352 mytmp['append'] = append 00353 mytmp['fillgaps'] = fillgaps 00354 mytmp['degamp'] = degamp 00355 mytmp['degphase'] = degphase 00356 mytmp['visnorm'] = visnorm 00357 mytmp['maskcenter'] = maskcenter 00358 mytmp['maskedge'] = maskedge 00359 mytmp['gaintable'] = gaintable 00360 mytmp['gainfield'] = gainfield 00361 mytmp['interp'] = interp 00362 mytmp['spwmap'] = spwmap 00363 mytmp['gaincurve'] = gaincurve 00364 mytmp['opacity'] = opacity 00365 mytmp['parang'] = parang 00366 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00367 trec = casac.utils().torecord(pathname+'bandpass.xml') 00368 00369 casalog.origin('bandpass') 00370 if not trec.has_key('bandpass') or not casac.utils().verify(mytmp, trec['bandpass']) : 00371 return False 00372 00373 00374 try : 00375 casalog.post('') 00376 casalog.post('##########################################') 00377 casalog.post('##### Begin Task: bandpass #####') 00378 casalog.post('') 00379 result = bandpass(vis, caltable, field, spw, intent, selectdata, timerange, uvrange, antenna, scan, observation, msselect, solint, combine, refant, minblperant, minsnr, solnorm, bandtype, smodel, append, fillgaps, degamp, degphase, visnorm, maskcenter, maskedge, gaintable, gainfield, interp, spwmap, gaincurve, opacity, parang) 00380 casalog.post('') 00381 casalog.post('##### End Task: bandpass #####') 00382 casalog.post('##########################################') 00383 00384 00385 # saveinputs for individule engine has no use 00386 # saveinputs should alos be removed from casa_in_py.py 00387 # 00388 # 00389 # saveinputs = myf['saveinputs'] 00390 # saveinputs('bandpass', 'bandpass.last', myparams) 00391 # 00392 # 00393 except Exception, instance: 00394 #print '**** Error **** ',instance 00395 pass 00396 00397 gc.collect() 00398 return result 00399 # 00400 # 00401 ## 00402 # def paramgui(self, useGlobals=True): 00403 # """ 00404 # Opens a parameter GUI for this task. If useGlobals is true, then any relevant global parameter settings are used. 00405 # """ 00406 # import paramgui 00407 # 00408 # a=inspect.stack() 00409 # stacklevel=0 00410 # for k in range(len(a)): 00411 # if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00412 # stacklevel=k 00413 # break 00414 # myf = sys._getframe(stacklevel).f_globals 00415 # 00416 # if useGlobals: 00417 # paramgui.setGlobals(myf) 00418 # else: 00419 # paramgui.setGlobals({}) 00420 # 00421 # paramgui.runTask('bandpass', myf['_ip']) 00422 # paramgui.setGlobals({}) 00423 # 00424 # 00425 # 00426 # 00427 def defaults(self, param=None): 00428 a=inspect.stack() 00429 stacklevel=0 00430 for k in range(len(a)): 00431 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00432 stacklevel=k 00433 break 00434 myf=sys._getframe(stacklevel).f_globals 00435 a = odict() 00436 a['vis'] = '' 00437 a['caltable'] = '' 00438 a['field'] = '' 00439 a['spw'] = '' 00440 a['intent'] = '' 00441 a['selectdata'] = True 00442 a['solint'] = 'inf' 00443 a['combine'] = 'scan' 00444 a['refant'] = '' 00445 a['minblperant'] = 4 00446 a['minsnr'] = 3.0 00447 a['solnorm'] = False 00448 a['bandtype'] = 'B' 00449 a['smodel'] = [] 00450 a['append'] = False 00451 a['gaintable'] = [''] 00452 a['gainfield'] = [''] 00453 a['interp'] = [''] 00454 a['spwmap'] = [] 00455 a['gaincurve'] = False 00456 a['opacity'] = [] 00457 a['parang'] = False 00458 00459 a['async']=False 00460 a['selectdata'] = { 00461 0:odict([{'value':True}, {'timerange':''}, {'uvrange':''}, {'antenna':''}, {'scan':''}, {'observation':''}, {'msselect':''}]), 00462 1:{'value':False}} 00463 a['bandtype'] = { 00464 0:odict([{'value':'B'}, {'fillgaps':0}]), 00465 1:odict([{'value':'BPOLY'}, {'degamp':3}, {'degphase':3}, {'visnorm':False}, {'maskcenter':0}, {'maskedge':0}])} 00466 00467 ### This function sets the default values but also will return the list of 00468 ### parameters or the default value of a given parameter 00469 if(param == None): 00470 myf['__set_default_parameters'](a) 00471 elif(param == 'paramkeys'): 00472 return a.keys() 00473 else: 00474 if(a.has_key(param)): 00475 #if(type(a[param]) == dict) : 00476 # return a[param][len(a[param])-1]['value'] 00477 #else : 00478 return a[param] 00479 00480 00481 # 00482 # 00483 def check_params(self, param=None, value=None): 00484 a=inspect.stack() 00485 stacklevel=0 00486 for k in range(len(a)): 00487 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00488 stacklevel=k 00489 break 00490 myf=sys._getframe(stacklevel).f_globals 00491 00492 # print 'param:', param, 'value:', value 00493 try : 00494 if str(type(value)) != "<type 'instance'>" : 00495 value0 = value 00496 value = myf['cu'].expandparam(param, value) 00497 matchtype = False 00498 if(type(value) == numpy.ndarray): 00499 if(type(value) == type(value0)): 00500 myf[param] = value.tolist() 00501 else: 00502 #print 'value:', value, 'value0:', value0 00503 #print 'type(value):', type(value), 'type(value0):', type(value0) 00504 myf[param] = value0 00505 if type(value0) != list : 00506 matchtype = True 00507 else : 00508 myf[param] = value 00509 value = myf['cu'].verifyparam({param:value}) 00510 if matchtype: 00511 value = False 00512 except Exception, instance: 00513 #ignore the exception and just return it unchecked 00514 myf[param] = value 00515 return value 00516 00517 # 00518 # 00519 def description(self, key='bandpass', subkey=None): 00520 desc={'bandpass': 'Calculates a bandpass calibration solution', 00521 'vis': 'Name of input visibility file', 00522 'caltable': 'Name of output gain calibration table', 00523 'field': 'Select field using field id(s) or field name(s)', 00524 'spw': 'Select spectral window/channels', 00525 'intent': 'Select observing intent', 00526 'selectdata': 'Other data selection parameters', 00527 'timerange': 'Select data based on time range', 00528 'uvrange': 'Select data within uvrange (default units meters)', 00529 'antenna': 'Select data based on antenna/baseline', 00530 'scan': 'Scan number range', 00531 'observation': 'Select by observation ID(s)', 00532 'msselect': 'Optional complex data selection (ignore for now)', 00533 'solint': 'Solution interval in time[,freq]', 00534 'combine': 'Data axes which to combine for solve (scan, spw, and/or field)', 00535 'refant': 'Reference antenna name(s)', 00536 'minblperant': 'Minimum baselines _per antenna_ required for solve', 00537 'minsnr': 'Reject solutions below this SNR (only applies for bandtype = B)', 00538 'solnorm': 'Normalize average solution amplitudes to 1.0 ', 00539 'bandtype': 'Type of bandpass solution (B or BPOLY)', 00540 'smodel': 'Point source Stokes parameters for source model.', 00541 'append': 'Append solutions to the (existing) table', 00542 'fillgaps': 'Fill flagged solution channels by interpolation', 00543 'degamp': 'Polynomial degree for BPOLY amplitude solution', 00544 'degphase': 'Polynomial degree for BPOLY phase solution', 00545 'visnorm': 'Normalize data prior to BPOLY solution', 00546 'maskcenter': 'Number of channels to avoid in center of each band', 00547 'maskedge': 'Fraction of channels to avoid at each band edge (in %)', 00548 'gaintable': 'Gain calibration table(s) to apply on the fly', 00549 'gainfield': 'Select a subset of calibrators from gaintable(s)', 00550 'interp': 'Interpolation mode (in time) to use for each gaintable', 00551 'spwmap': 'Spectral windows combinations to form for gaintables(s)', 00552 'gaincurve': 'Apply internal VLA antenna gain curve correction', 00553 'opacity': 'Opacity correction to apply (nepers), per spw', 00554 'parang': 'Apply parallactic angle correction', 00555 00556 'async': 'If true the taskname must be started using bandpass(...)' 00557 } 00558 00559 # 00560 # Set subfields defaults if needed 00561 # 00562 00563 if(desc.has_key(key)) : 00564 return desc[key] 00565 00566 def itsdefault(self, paramname) : 00567 a = {} 00568 a['vis'] = '' 00569 a['caltable'] = '' 00570 a['field'] = '' 00571 a['spw'] = '' 00572 a['intent'] = '' 00573 a['selectdata'] = True 00574 a['timerange'] = '' 00575 a['uvrange'] = '' 00576 a['antenna'] = '' 00577 a['scan'] = '' 00578 a['observation'] = '' 00579 a['msselect'] = '' 00580 a['solint'] = 'inf' 00581 a['combine'] = 'scan' 00582 a['refant'] = '' 00583 a['minblperant'] = 4 00584 a['minsnr'] = 3.0 00585 a['solnorm'] = False 00586 a['bandtype'] = 'B' 00587 a['smodel'] = [] 00588 a['append'] = False 00589 a['fillgaps'] = 0 00590 a['degamp'] = 3 00591 a['degphase'] = 3 00592 a['visnorm'] = False 00593 a['maskcenter'] = 0 00594 a['maskedge'] = 5 00595 a['gaintable'] = [''] 00596 a['gainfield'] = [''] 00597 a['interp'] = [''] 00598 a['spwmap'] = [] 00599 a['gaincurve'] = False 00600 a['opacity'] = [] 00601 a['parang'] = False 00602 00603 if a.has_key(paramname) : 00604 return a[paramname] 00605 bandpass_pg = bandpass_pg_()