Changeset 2480
- Timestamp:
- 05/04/12 11:11:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2435 r2480 436 436 437 437 """ 438 # info = Scantable._summary(self)439 438 if filename is not None: 440 439 if filename is "": … … 442 441 from os.path import expandvars, isdir 443 442 filename = expandvars(filename) 444 # if not isdir(filename):445 # data = open(filename, 'w')446 # data.write(info)447 # data.close()448 # else:449 443 if isdir(filename): 450 444 msg = "Illegal file name '%s'." % (filename) … … 453 447 filename = "" 454 448 Scantable._summary(self, filename) 455 # info = Scantable._summary(self, filename)456 # return page(info)457 449 458 450 def get_spectrum(self, rowno): … … 3335 3327 """ 3336 3328 varlist = vars() 3337 basesel = self.get_selection()3338 3329 stype = -1 3339 if sourcetype.lower().startswith("r") :3330 if sourcetype.lower().startswith("r") or sourcetype.lower() == "off": 3340 3331 stype = 1 3341 elif sourcetype.lower().startswith("s") :3332 elif sourcetype.lower().startswith("s") or sourcetype.lower() == "on": 3342 3333 stype = 0 3343 3334 else: 3344 raise ValueError("Illegal sourcetype use s(ource) or r(eference)")3335 raise ValueError("Illegal sourcetype use s(ource)/on or r(eference)/off") 3345 3336 if matchtype.lower().startswith("p"): 3346 3337 matchtype = "pattern" … … 3353 3344 sel = match 3354 3345 else: 3355 sel.set_query("SRCNAME == %s('%s')" % (matchtype, match)) 3346 sel.set_query("SRCNAME=%s('%s')" % (matchtype, match)) 3347 self.set_selection(sel) 3356 3348 self._setsourcetype(stype) 3357 3349 self._add_history("set_sourcetype", varlist) … … 3688 3680 else: 3689 3681 r = filler( tbl ) 3690 rx = rcParams['scantable.reference']3691 r.setreferenceexpr(rx)3692 3682 msg = "Importing %s..." % (name) 3693 3683 asaplog.push(msg, False) 3694 3684 r.open(name, opts) 3685 rx = rcParams['scantable.reference'] 3686 r.setreferenceexpr(rx) 3695 3687 r.fill() 3696 3688 if average:
Note:
See TracChangeset
for help on using the changeset viewer.