Changeset 714
- Timestamp:
- 11/17/05 14:33:03 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r710 r714 1 1 from asap._asap import sdtable 2 2 from asap import rcParams 3 from asap import print_log 3 4 from numarray import ones,zeros 4 5 import sys … … 63 64 beamSel = -1 64 65 r = sdreader() 65 r._setlog(asaplog)66 66 r._open(filename,ifSel,beamSel) 67 67 asaplog.push('Importing data...') … … 80 80 del r,tbl 81 81 self._add_history("scantable", varlist) 82 log = asaplog.pop() 83 if len(log): print log 82 print_log() 84 83 85 84 def save(self, name=None, format=None, stokes=False, overwrite=False): … … 397 396 return self._gettime(row) 398 397 398 def get_sourcename(self, row=-1): 399 """ 400 Get a list source anmes for the observations. 401 Return a string for each integration in the scantable. 402 Parameters: 403 row: row no of integration. Default -1 return all rows 404 Example: 405 none 406 """ 407 out = [] 408 if row == -1: 409 return [self._getsourcename(i) for i in range(self.nrow())] 410 else: 411 if 0 <= row < self.nrow(): 412 return self._getsourcename(row) 413 399 414 def set_unit(self, unit='channel'): 400 415 """ … … 558 573 Print the list of known spectral lines 559 574 """ 560 sdtable._lines(self) 575 l = sdtable._lines(self) 576 if rcParams['verbose']: 577 print l 578 else: 579 return l 561 580 562 581 def set_restfreqs(self, freqs=None, unit='Hz', lines=None, source=None, … … 1285 1304 """ 1286 1305 modes = ["suffix","time"] 1287 print mode1288 1306 if not mode in modes: 1289 1307 print "please provide valid mode. Valid modes are %s" % (modes) … … 1476 1494 i = j 1477 1495 return segments 1496 1478 1497 def _get_ordinate_label(self): 1479 1498 fu = "("+self.get_fluxunit()+")"
Note:
See TracChangeset
for help on using the changeset viewer.