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_sdcal import sdcal 00016 from task_sdcal import casalog 00017 00018 class sdcal_pg_: 00019 __name__ = "sdcal" 00020 00021 def __init__(self) : 00022 self.__bases__ = (sdcal_pg_,) 00023 self.__doc__ = self.__call__.__doc__ 00024 00025 00026 def __call__(self, infile=None, antenna=None, fluxunit=None, telescopeparm=None, specunit=None, frame=None, doppler=None, calmode=None, fraction=None, noff=None, width=None, elongated=None, markonly=None, plotpointings=None, scanlist=None, field=None, iflist=None, pollist=None, channelrange=None, scanaverage=None, timeaverage=None, tweight=None, averageall=None, polaverage=None, pweight=None, tau=None, verify=None, outfile=None, outform=None, overwrite=None, plotlevel=None, async=None): 00027 00028 """ASAP SD task: do data selection, calibration, and averaging 00029 Keyword arguments: 00030 infile -- name of input SD dataset 00031 antenna -- antenna name or id (only effective for MS input). 00032 fluxunit -- units for line flux 00033 options: 'K','Jy','' 00034 default: '' (keep current fluxunit) 00035 WARNING: For GBT data, see description below. 00036 00037 >>> fluxunit expandable parameter 00038 telescopeparm -- the telescope characteristics 00039 options: (str) name or (list) list of gain info 00040 default: '' (none set) 00041 example: if telescopeparm='', it tries to get the telescope 00042 name from the data. 00043 Full antenna parameters (diameter,ap.eff.) known 00044 to ASAP are 00045 'ATPKSMB', 'ATPKSHOH', 'ATMOPRA', 'DSS-43', 00046 'CEDUNA','HOBART'. For GBT, it fixes default fluxunit 00047 to 'K' first then convert to a new fluxunit. 00048 telescopeparm=[104.9,0.43] diameter(m), ap.eff. 00049 telescopeparm=[0.743] gain in Jy/K 00050 telescopeparm='FIX' to change default fluxunit 00051 see description below 00052 00053 specunit -- units for spectral axis 00054 options: (str) 'channel','km/s','GHz','MHz','kHz','Hz' 00055 default: '' (=current) 00056 example: this will be the units for masklist 00057 frame -- frequency frame for spectral axis 00058 options: (str) 'LSRK','REST','TOPO','LSRD','BARY', 00059 'GEO','GALACTO','LGROUP','CMB' 00060 default: currently set frame in scantable 00061 WARNING: frame='REST' not yet implemented 00062 doppler -- doppler mode 00063 options: (str) 'RADIO','OPTICAL','Z','BETA','GAMMA' 00064 default: currently set doppler in scantable 00065 calmode -- calibration mode 00066 options: 'ps','nod','otf','otfraster', 00067 'fs','fsotf','quotient','none' 00068 default: 'none' 00069 example: choose mode 'none' if you have 00070 already calibrated and want to 00071 try averaging 00072 WARNING: 'fsotf' is not implemented yet 00073 >>> calmode expandable parameter 00074 fraction -- Edge marking parameter for 'otf' and 'otfraster'. 00075 specify a number of OFF scans as a fraction of 00076 total number of data points. 00077 default: '10%' 00078 options: '20%' in string style or float value less 00079 than 1.0 (e.g. 0.15). 00080 'auto' is available only for 'otfraster'. 00081 noff -- Edge marking parameter for 'otfraster'. 00082 It is used to specify a number of OFF scans near 00083 edge directly. Value of noff comes before setting 00084 by fraction. 00085 default: -1 (use fraction) 00086 options: any positive integer 00087 width -- Edge marking parameter for 'otf'. 00088 Pixel width with respect to a median spatial 00089 separation between neighboring two data in time. 00090 Default will be fine in most cases. 00091 default: 0.5 00092 options: float value 00093 elongated -- Edge marking parameter for 'otf'. 00094 Set True only if observed area is elongeted 00095 in one direction. 00096 default: False 00097 markonly -- Set True if you want to save data just after 00098 edge marking (i.e. uncalibrated data) to see 00099 how OFF scans are defined. 00100 default: False 00101 scanlist -- list of scan numbers to process 00102 default: [] (use all scans) 00103 example: [21,22,23,24] 00104 this selection is in addition to field, iflist, and pollist 00105 field -- selection string for selecting scans by name 00106 default: '' (no name selection) 00107 example: 'FLS3a*' 00108 this selection is in addition to scanlist, iflist, and pollist 00109 iflist -- list of IF id numbers to select 00110 default: [] (use all IFs) 00111 example: [15] 00112 this selection is in addition to scanlist, field, and pollist 00113 pollist -- list of polarization id numbers to select 00114 default: [] (use all polarizations) 00115 example: [1] 00116 this selection is in addition to scanlist, field, and iflist 00117 channelrange -- channel range selection 00118 default: [] (use all channel) 00119 example: [0,5000] 00120 Note that specified values are recognized as 'channel' 00121 regardless of the value of specunit 00122 scanaverage -- average integrations within scans 00123 options: (bool) True,False 00124 default: False 00125 timeaverage -- average times for multiple scan cycles 00126 options: (bool) True,False 00127 default: False 00128 example: if True, this happens after calibration 00129 00130 >>>timeaverage expandable parameter 00131 tweight -- weighting for time average 00132 options: 'none' 00133 'var' (1/var(spec) weighted) 00134 'tsys' (1/Tsys**2 weighted) 00135 'tint' (integration time weighted) 00136 'tintsys' (Tint/Tsys**2) 00137 'median' ( median averaging) 00138 default: 'none' 00139 00140 averageall -- average multi-resolution spectra 00141 spectra are averaged by referring 00142 their frequency coverage 00143 default: False 00144 00145 polaverage -- average polarizations 00146 options: (bool) True,False 00147 default: False 00148 00149 >>>polaverage expandable parameter 00150 pweight -- weighting for polarization average 00151 options: 'none' 00152 'var' (1/var(spec) weighted) 00153 'tsys' (1/Tsys**2 weighted) 00154 default: 'none' 00155 00156 tau -- atmospheric optical depth 00157 default: 0.0 (no correction) 00158 verify -- verify the results of calibration. Only effective if 00159 calmode is not 'none'. 00160 options: (bool) True,False 00161 default: False 00162 WARNING: Currently this just asks whether you accept 00163 the displayed calibration and if not, continues 00164 without doing any calibration. 00165 outfile -- Name of output file 00166 default: '' (<infile>_cal) 00167 outform -- format of output file 00168 options: 'ASCII','SDFITS','MS','ASAP' 00169 default: 'ASAP' 00170 example: the ASAP format is easiest for further sd 00171 processing; use MS for CASA imaging. 00172 If ASCII, then will append some stuff to 00173 the outfile name 00174 overwrite -- overwrite the output file if already exists 00175 options: (bool) True,False 00176 default: False 00177 WARNING: if outform='ASCII', this parameter is ignored 00178 plotlevel -- control for plotting of results 00179 options: (int) 0=none, 1=some, 2=more, <0=hardcopy 00180 default: 0 (no plotting) 00181 example: plotlevel<0 as abs(plotlevel), e.g. 00182 -1 => hardcopy of final plot (will be named 00183 <outfile>_calspec.eps) 00184 WARNING: be careful plotting in fsotf mode! 00185 00186 00187 DESCRIPTION: 00188 00189 Task sdcal performs data selection, calibration for single-dish 00190 spectra. By setting calmode='none', one can run sdcal on already 00191 calibrated data, for further selection , averaging and atmospheric 00192 optical depth correction. To save the output spectra in a certain 00193 range of channels, you set the range in channelrange. 00194 00195 If you give multiple IFs in iflist, then your scantable will have 00196 multiple IFs by default. Averaging of multi-resolution (multi-IFs) 00197 spectra can be achieved by setting a sub-parameter in timeaverage, 00198 averageall, to True. It handles multi-IFs by selecting overlaps in 00199 frequency coverages and assigning new IFs in the output spectra. 00200 00201 ASAP recognizes the data of the "AT" telescopes, but currently 00202 does not know about the GBT or any other telescope. This task 00203 does know about GBT. Telescope name is obtained from the data. 00204 If you wish to change the fluxunit (see below), by leaving 00205 the sub-parameter telescopeparm unset (telescopeparm=''), 00206 it will use internal telescope parameters for 00207 flux conversion for the data from AT telescopes and it will use an 00208 approximate aperture efficiency conversion for the GBT data. 00209 If you give telescopeparm a list, then if the list has a single 00210 float it is assumed to be the gain in Jy/K, if two or more elements 00211 they are assumed to be telescope diameter (m) and aperture efficiency 00212 respectively. 00213 00214 Note that sdcal assumes that the fluxunit is set correctly in 00215 the data already. If not, then set telescopeparm='FIX' and it 00216 will set the default units to fluxunit without conversion. 00217 NOTE: If the data in infile is an ms from GBT and the default flux 00218 unit is missing, this task automatically fixes the default fluxunit 00219 to 'K' before the conversion. 00220 00221 Two new calmode, 'otf' and 'otfraster', are available. If you 00222 specify those modes, the task first try to define several scans 00223 near edge as OFF scans, then the data are calibrated using those 00224 OFF scans. Those modes are designed for OTF observations without 00225 explicit OFF scans. If the observing pattern is 'raster', you 00226 should use the 'otfraster' mode to calibrate data. Otherwise, the 00227 'otf' mode should be used. For detail about edge marking, see 00228 online help of sd.edgemarker module. 00229 00230 WARNING for the GBT raw SDFITS format data as input: 00231 SDtasks are able to handle GBT raw SDFITS format data since the 00232 data filler is available. However, the functionality is not well 00233 tested yet, so that there may be unknown bugs. 00234 00235 00236 """ 00237 a=inspect.stack() 00238 stacklevel=0 00239 for k in range(len(a)): 00240 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00241 stacklevel=k 00242 break 00243 myf=sys._getframe(stacklevel).f_globals 00244 myf['__last_task'] = 'sdcal' 00245 myf['taskname'] = 'sdcal' 00246 ### 00247 myf['update_params'](func=myf['taskname'],printtext=False) 00248 ### 00249 ### 00250 #Handle globals or user over-ride of arguments 00251 # 00252 function_signature_defaults=dict(zip(self.__call__.func_code.co_varnames,self.__call__.func_defaults)) 00253 useLocalDefaults = False 00254 00255 for item in function_signature_defaults.iteritems(): 00256 key,val = item 00257 keyVal = eval(key) 00258 if (keyVal == None): 00259 #user hasn't set it - use global/default 00260 pass 00261 else: 00262 #user has set it - use over-ride 00263 if (key != 'self') : 00264 useLocalDefaults = True 00265 #myf[key]=keyVal 00266 00267 myparams = {} 00268 if useLocalDefaults : 00269 for item in function_signature_defaults.iteritems(): 00270 key,val = item 00271 keyVal = eval(key) 00272 exec('myparams[key] = keyVal') 00273 if (keyVal == None): 00274 exec('myparams[key] = '+ key + ' = self.itsdefault(key)') 00275 keyVal = eval(key) 00276 if(type(keyVal) == dict) : 00277 exec('myparams[key] = ' + key + ' = keyVal[len(keyVal)-1][\'value\']') 00278 00279 else : 00280 uselessvariable = None 00281 myparams['infile'] = infile = myf['infile'] 00282 myparams['antenna'] = antenna = myf['antenna'] 00283 myparams['fluxunit'] = fluxunit = myf['fluxunit'] 00284 myparams['telescopeparm'] = telescopeparm = myf['telescopeparm'] 00285 myparams['specunit'] = specunit = myf['specunit'] 00286 myparams['frame'] = frame = myf['frame'] 00287 myparams['doppler'] = doppler = myf['doppler'] 00288 myparams['calmode'] = calmode = myf['calmode'] 00289 myparams['fraction'] = fraction = myf['fraction'] 00290 myparams['noff'] = noff = myf['noff'] 00291 myparams['width'] = width = myf['width'] 00292 myparams['elongated'] = elongated = myf['elongated'] 00293 myparams['markonly'] = markonly = myf['markonly'] 00294 myparams['plotpointings'] = plotpointings = myf['plotpointings'] 00295 myparams['scanlist'] = scanlist = myf['scanlist'] 00296 myparams['field'] = field = myf['field'] 00297 myparams['iflist'] = iflist = myf['iflist'] 00298 myparams['pollist'] = pollist = myf['pollist'] 00299 myparams['channelrange'] = channelrange = myf['channelrange'] 00300 myparams['scanaverage'] = scanaverage = myf['scanaverage'] 00301 myparams['timeaverage'] = timeaverage = myf['timeaverage'] 00302 myparams['tweight'] = tweight = myf['tweight'] 00303 myparams['averageall'] = averageall = myf['averageall'] 00304 myparams['polaverage'] = polaverage = myf['polaverage'] 00305 myparams['pweight'] = pweight = myf['pweight'] 00306 myparams['tau'] = tau = myf['tau'] 00307 myparams['verify'] = verify = myf['verify'] 00308 myparams['outfile'] = outfile = myf['outfile'] 00309 myparams['outform'] = outform = myf['outform'] 00310 myparams['overwrite'] = overwrite = myf['overwrite'] 00311 myparams['plotlevel'] = plotlevel = myf['plotlevel'] 00312 00313 if type(scanlist)==int: scanlist=[scanlist] 00314 if type(iflist)==int: iflist=[iflist] 00315 if type(pollist)==int: pollist=[pollist] 00316 if type(channelrange)==int: channelrange=[channelrange] 00317 00318 result = None 00319 00320 # 00321 # The following is work around to avoid a bug with current python translation 00322 # 00323 mytmp = {} 00324 00325 mytmp['infile'] = infile 00326 mytmp['antenna'] = antenna 00327 mytmp['fluxunit'] = fluxunit 00328 mytmp['telescopeparm'] = telescopeparm 00329 mytmp['specunit'] = specunit 00330 mytmp['frame'] = frame 00331 mytmp['doppler'] = doppler 00332 mytmp['calmode'] = calmode 00333 mytmp['fraction'] = fraction 00334 mytmp['noff'] = noff 00335 mytmp['width'] = width 00336 mytmp['elongated'] = elongated 00337 mytmp['markonly'] = markonly 00338 mytmp['plotpointings'] = plotpointings 00339 mytmp['scanlist'] = scanlist 00340 mytmp['field'] = field 00341 mytmp['iflist'] = iflist 00342 mytmp['pollist'] = pollist 00343 mytmp['channelrange'] = channelrange 00344 mytmp['scanaverage'] = scanaverage 00345 mytmp['timeaverage'] = timeaverage 00346 mytmp['tweight'] = tweight 00347 mytmp['averageall'] = averageall 00348 mytmp['polaverage'] = polaverage 00349 mytmp['pweight'] = pweight 00350 mytmp['tau'] = tau 00351 mytmp['verify'] = verify 00352 mytmp['outfile'] = outfile 00353 mytmp['outform'] = outform 00354 mytmp['overwrite'] = overwrite 00355 mytmp['plotlevel'] = plotlevel 00356 pathname='file:///'+os.environ.get('CASAPATH').split()[0]+'/share/xml/' 00357 trec = casac.utils().torecord(pathname+'sdcal.xml') 00358 00359 casalog.origin('sdcal') 00360 if not trec.has_key('sdcal') or not casac.utils().verify(mytmp, trec['sdcal']) : 00361 return False 00362 00363 00364 try : 00365 casalog.post('') 00366 casalog.post('##########################################') 00367 casalog.post('##### Begin Task: sdcal #####') 00368 casalog.post('') 00369 result = sdcal(infile, antenna, fluxunit, telescopeparm, specunit, frame, doppler, calmode, fraction, noff, width, elongated, markonly, plotpointings, scanlist, field, iflist, pollist, channelrange, scanaverage, timeaverage, tweight, averageall, polaverage, pweight, tau, verify, outfile, outform, overwrite, plotlevel) 00370 casalog.post('') 00371 casalog.post('##### End Task: sdcal #####') 00372 casalog.post('##########################################') 00373 00374 00375 # saveinputs for individule engine has no use 00376 # saveinputs should alos be removed from casa_in_py.py 00377 # 00378 # 00379 # saveinputs = myf['saveinputs'] 00380 # saveinputs('sdcal', 'sdcal.last', myparams) 00381 # 00382 # 00383 except Exception, instance: 00384 #print '**** Error **** ',instance 00385 pass 00386 00387 gc.collect() 00388 return result 00389 # 00390 # 00391 ## 00392 # def paramgui(self, useGlobals=True): 00393 # """ 00394 # Opens a parameter GUI for this task. If useGlobals is true, then any relevant global parameter settings are used. 00395 # """ 00396 # import paramgui 00397 # 00398 # a=inspect.stack() 00399 # stacklevel=0 00400 # for k in range(len(a)): 00401 # if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00402 # stacklevel=k 00403 # break 00404 # myf = sys._getframe(stacklevel).f_globals 00405 # 00406 # if useGlobals: 00407 # paramgui.setGlobals(myf) 00408 # else: 00409 # paramgui.setGlobals({}) 00410 # 00411 # paramgui.runTask('sdcal', myf['_ip']) 00412 # paramgui.setGlobals({}) 00413 # 00414 # 00415 # 00416 # 00417 def defaults(self, param=None): 00418 a=inspect.stack() 00419 stacklevel=0 00420 for k in range(len(a)): 00421 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00422 stacklevel=k 00423 break 00424 myf=sys._getframe(stacklevel).f_globals 00425 a = odict() 00426 a['infile'] = '' 00427 a['antenna'] = 0 00428 a['fluxunit'] = '' 00429 a['specunit'] = '' 00430 a['frame'] = '' 00431 a['doppler'] = '' 00432 a['calmode'] = 'none' 00433 a['scanlist'] = [] 00434 a['field'] = '' 00435 a['iflist'] = [] 00436 a['pollist'] = [] 00437 a['channelrange'] = [] 00438 a['scanaverage'] = False 00439 a['timeaverage'] = False 00440 a['polaverage'] = False 00441 a['tau'] = 0.0 00442 a['verify'] = False 00443 a['outfile'] = '' 00444 a['outform'] = 'ASAP' 00445 a['overwrite'] = False 00446 a['plotlevel'] = 0 00447 00448 a['async']=False 00449 a['fluxunit'] = { 00450 0:{'value':''}, 00451 1:odict([{'value':'K'}, {'telescopeparm':''}]), 00452 2:odict([{'value':'k'}, {'telescopeparm':''}]), 00453 3:odict([{'value':'Jy'}, {'telescopeparm':''}]), 00454 4:odict([{'value':'jy'}, {'telescopeparm':''}])} 00455 a['timeaverage'] = { 00456 0:{'value':False}, 00457 1:odict([{'value':True}, {'tweight':'none'}, {'averageall':False}])} 00458 a['polaverage'] = { 00459 0:{'value':False}, 00460 1:odict([{'value':True}, {'pweight':'none'}])} 00461 a['calmode'] = { 00462 0:{'value':'none'}, 00463 1:{'value':'ps'}, 00464 2:{'value':'nod'}, 00465 3:{'value':'fs'}, 00466 4:{'value':'fsotf'}, 00467 5:{'value':'quotient'}, 00468 6:odict([{'value':'otf'}, {'fraction':'10%'}, {'width':0.5}, {'elongated':False}, {'markonly':False}, {'plotpointings':False}]), 00469 7:odict([{'value':'otfraster'}, {'fraction':'10%'}, {'noff':-1}, {'markonly':False}, {'plotpointings':False}])} 00470 00471 ### This function sets the default values but also will return the list of 00472 ### parameters or the default value of a given parameter 00473 if(param == None): 00474 myf['__set_default_parameters'](a) 00475 elif(param == 'paramkeys'): 00476 return a.keys() 00477 else: 00478 if(a.has_key(param)): 00479 #if(type(a[param]) == dict) : 00480 # return a[param][len(a[param])-1]['value'] 00481 #else : 00482 return a[param] 00483 00484 00485 # 00486 # 00487 def check_params(self, param=None, value=None): 00488 a=inspect.stack() 00489 stacklevel=0 00490 for k in range(len(a)): 00491 if (string.find(a[k][1], 'ipython console') > 0) or (string.find(a[k][1], '<string>') >= 0): 00492 stacklevel=k 00493 break 00494 myf=sys._getframe(stacklevel).f_globals 00495 00496 # print 'param:', param, 'value:', value 00497 try : 00498 if str(type(value)) != "<type 'instance'>" : 00499 value0 = value 00500 value = myf['cu'].expandparam(param, value) 00501 matchtype = False 00502 if(type(value) == numpy.ndarray): 00503 if(type(value) == type(value0)): 00504 myf[param] = value.tolist() 00505 else: 00506 #print 'value:', value, 'value0:', value0 00507 #print 'type(value):', type(value), 'type(value0):', type(value0) 00508 myf[param] = value0 00509 if type(value0) != list : 00510 matchtype = True 00511 else : 00512 myf[param] = value 00513 value = myf['cu'].verifyparam({param:value}) 00514 if matchtype: 00515 value = False 00516 except Exception, instance: 00517 #ignore the exception and just return it unchecked 00518 myf[param] = value 00519 return value 00520 00521 # 00522 # 00523 def description(self, key='sdcal', subkey=None): 00524 desc={'sdcal': 'ASAP SD task: do data selection, calibration, and averaging', 00525 'infile': 'name of input SD dataset', 00526 'antenna': 'antenna name or id (only effective for MS input)', 00527 'fluxunit': 'units for line flux (K,Jy) (''=current)', 00528 'telescopeparm': 'param of telescope for flux conversion', 00529 'specunit': 'units for spectral axis (channel,km/s,GHz,''=current)', 00530 'frame': 'frequency reference frame, e.g. LSRK (''=current)', 00531 'doppler': 'doppler convention, e.g. RADIO (''=current)', 00532 'calmode': 'SD calibration mode (ps,nod,otf,otfraster,fs,fsotf,quotient,none)', 00533 'fraction': 'fraction of the OFF data to mark', 00534 'noff': 'number of the OFF data to mark', 00535 'width': 'width of the pixel for edge detection', 00536 'elongated': 'whether observed area is elongated in one direction or not', 00537 'markonly': 'do calibration (False) or just mark OFF (True)', 00538 'plotpointings': 'plot pointing direction for ON and OFF', 00539 'scanlist': 'list of scans to use (e.g. [1,2,3,4])', 00540 'field': 'string for selection by source name', 00541 'iflist': 'list of IF ids to select (e.g. [0,1])', 00542 'pollist': 'list of polarization ids to select (e.g. [0,1])', 00543 'channelrange': 'channel range selection (e.g. [0,5000])', 00544 'scanaverage': 'average integs within scans (True,False) ', 00545 'timeaverage': 'average scans over time (True,False)', 00546 'tweight': 'weighting for time averaging', 00547 'averageall': 'set True only when averaging spectra with different spectral resolutions', 00548 'polaverage': 'average over polarizations (True,False)', 00549 'pweight': 'weighting for polarization averaging', 00550 'tau': 'atmospheric optical depth for correction', 00551 'verify': 'verify the results of calibration', 00552 'outfile': 'output file name', 00553 'outform': 'output file format (ASCII,MS,SDFITS,ASAP)', 00554 'overwrite': 'overwrite the output file if already exists', 00555 'plotlevel': 'plot results (0=none,1+=some,<0=hardcopy)', 00556 00557 'async': 'If true the taskname must be started using sdcal(...)' 00558 } 00559 00560 # 00561 # Set subfields defaults if needed 00562 # 00563 00564 if(desc.has_key(key)) : 00565 return desc[key] 00566 00567 def itsdefault(self, paramname) : 00568 a = {} 00569 a['infile'] = '' 00570 a['antenna'] = 0 00571 a['fluxunit'] = '' 00572 a['telescopeparm'] = '' 00573 a['specunit'] = '' 00574 a['frame'] = '' 00575 a['doppler'] = '' 00576 a['calmode'] = 'none' 00577 a['fraction'] = '10%' 00578 a['noff'] = -1 00579 a['width'] = 0.5 00580 a['elongated'] = False 00581 a['markonly'] = False 00582 a['plotpointings'] = False 00583 a['scanlist'] = [] 00584 a['field'] = '' 00585 a['iflist'] = [] 00586 a['pollist'] = [] 00587 a['channelrange'] = [] 00588 a['scanaverage'] = False 00589 a['timeaverage'] = False 00590 a['tweight'] = 'none' 00591 a['averageall'] = False 00592 a['polaverage'] = False 00593 a['pweight'] = 'none' 00594 a['tau'] = 0.0 00595 a['verify'] = False 00596 a['outfile'] = '' 00597 a['outform'] = 'ASAP' 00598 a['overwrite'] = False 00599 a['plotlevel'] = 0 00600 00601 if a.has_key(paramname) : 00602 return a[paramname] 00603 sdcal_pg = sdcal_pg_()