Changeset 1603 for branches/alma/python/__init__.py
- Timestamp:
- 07/18/09 06:35:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/__init__.py
r1494 r1603 32 32 os.mkdir(userdir) 33 33 #shutil.copyfile(asapdata+"/data/ipythonrc-asap", userdir+"/ipythonrc-asap") 34 # commented out by TT on 2009.06.23 for casapy use 35 ##shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 36 ## userdir+"/ipy_user_conf.py") 34 37 f = file(userdir+"/asapuserfuncs.py", "w") 35 38 f.close() 36 39 f = file(userdir+"/ipythonrc", "w") 37 40 f.close() 41 # commented out by TT on 2009.06.23 for casapy use 42 ##else: 43 # upgrade to support later ipython versions 44 ##if not os.path.exists(userdir+"/ipy_user_conf.py"): 45 ## shutil.copyfile(asapdata+"/data/ipy_user_conf.py", 46 ## userdir+"/ipy_user_conf.py") 47 38 48 # remove from namespace 39 49 del asapdata, userdir, shutil, platform … … 99 109 'plotter.histogram' : [False, _validate_bool], 100 110 'plotter.papertype' : ['A4', str], 111 'plotter.xaxisformatting' : ['asap', str], 101 112 102 113 # scantable … … 105 116 'scantable.freqframe' : ['LSRK', str], #default frequency frame 106 117 'scantable.verbosesummary' : [False, _validate_bool], 107 'scantable.storage' : ['memory', str] 118 'scantable.storage' : ['memory', str], 119 'scantable.history' : [True, _validate_bool], 120 'scantable.reference' : ['.*(e|w|_R)$', str] 108 121 # fitter 109 122 } … … 136 149 plotter.ganged : True 137 150 138 # decimate the number of points plotted by a afactor of151 # decimate the number of points plotted by a factor of 139 152 # nchan/1024 140 153 plotter.decimate : False … … 150 163 plotter.papertype : A4 151 164 165 # The formatting style of the xaxis 166 plotter.xaxisformatting : 'asap' or 'mpl' 167 152 168 # scantable 153 169 154 170 # default storage of scantable ('memory'/'disk') 155 171 scantable.storage : memory 172 173 # write history of each call to scantable 174 scantable.history : True 175 156 176 # default ouput format when saving 157 177 scantable.save : ASAP 178 158 179 # auto averaging on read 159 180 scantable.autoaverage : True … … 166 187 scantable.verbosesummary : False 167 188 189 # Control the identification of reference (off) scans 190 # This is has to be a regular expression 191 scantable.reference : .*(e|w|_R)$ 168 192 # Fitter 169 193 """ … … 242 266 for k,v in kwargs.items(): 243 267 name = aliases.get(k) or k 244 key = '%s.%s' % (group, name) 268 if len(group): 269 key = '%s.%s' % (group, name) 270 else: 271 key = name 245 272 if not rcParams.has_key(key): 246 273 raise KeyError('Unrecognized key "%s" for group "%s" and name "%s"' % (key, group, name)) … … 352 379 if rcParams['useplotter']: 353 380 try: 354 from asapplotter import asapplotter 355 gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui'] 356 if gui: 357 import pylab as xyplotter 358 plotter = asapplotter(gui) 359 del gui 381 from asapplotter import asapplotter 382 gui = os.environ.has_key('DISPLAY') and rcParams['plotter.gui'] 383 if gui: 384 import matplotlib 385 matplotlib.use("TkAgg") 386 import pylab 387 xyplotter = pylab 388 plotter = asapplotter(gui) 389 del gui 360 390 except ImportError: 361 391 print "Matplotlib not installed. No plotting available" 362 392 363 393 __date__ = '$Date$'.split()[1] 364 __version__ = '2. 2.0alma'394 __version__ = '2.3.1 alma' 365 395 # nrao casapy specific, get revision number 366 396 #__revision__ = ' unknown ' … … 369 399 if os.path.isfile(revinfo): 370 400 f = file(revinfo) 371 f.readline()401 #f.readline() 372 402 revsionno=f.readline() 373 403 f.close() … … 427 457 get_fluxunit - get the brightness flux unit 428 458 set_fluxunit - set the brightness flux unit 459 set_sourcetype - set the type of the source - source or reference 429 460 create_mask - return an mask in the current unit 430 461 for the given region. The specified regions … … 432 463 get_restfreqs - get the current list of rest frequencies 433 464 set_restfreqs - set a list of rest frequencies 434 shift_refpix - shift the reference pixel of the IFs 465 shift_refpix - shift the reference pixel of the IFs 466 set_spectrum - overwrite the spectrum for a given row 467 get_spectrum - retrieve the spectrum for a given 468 get_mask - retrieve the mask for a given 435 469 flag - flag selected channels in the data 436 470 lag_flag - flag specified frequency in the data … … 439 473 nbeam,nif,nchan,npol - the number of beams/IFs/Pols/Chans 440 474 nscan - the number of scans in the scantable 441 nrow - t e number of spectra in the scantable475 nrow - the number of spectra in the scantable 442 476 history - print the history of the scantable 443 477 get_fit - get a fit which has been stored witnh the data
Note: See TracChangeset
for help on using the changeset viewer.