Changeset 1781
- Timestamp:
- 07/30/10 11:32:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/scantable.py
r1757 r1781 75 75 tmpstr = '' 76 76 for i in range( len(antenna) ): 77 if type(antenna[i]) == int: 78 tmpstr = tmpstr + ('%s,'%(antenna[i])) 77 if type(antenna[i]) == int: 78 tmpstr = tmpstr + ('%s,'%(antenna[i])) 79 79 elif type(antenna[i]) == str: 80 80 tmpstr=tmpstr+antenna[i]+',' … … 82 82 asaplog.push('Bad antenna selection.') 83 83 print_log('ERROR') 84 return 84 return 85 85 antenna = tmpstr.rstrip(',') 86 86 parallactify = parallactify or rcParams['scantable.parallactify'] … … 485 485 if stat.lower().endswith('_abc'): rtnabc = True 486 486 getchan = False 487 if stat.lower().startswith('min') or stat.lower().startswith('max'): 487 if stat.lower().startswith('min') or stat.lower().startswith('max'): 488 488 chan = self._math._minmaxchan(self, mask, stat) 489 489 getchan = True … … 522 522 if self.npol(-1) > 1: out += ' Pol[%d] ' % (self.getpol(i)) 523 523 #outvec.append(callback(i)) 524 #out += ('= %'+form) % (outvec[i]) +' '+refstr+'\n' 525 out += ('= %'+form) % (statvals[i]) +' '+refstr+'\n' 524 #out += ('= %'+form) % (outvec[i]) +' '+refstr+'\n' 525 out += ('= %'+form) % (statvals[i]) +' '+refstr+'\n' 526 526 out += sep+"\n" 527 527 … … 927 927 else: raise 928 928 self._add_history("flag_row", varlist) 929 929 930 930 def clip(self, uthres=None, dthres=None, clipoutside=True, unflag=False): 931 931 """ … … 1221 1221 # list values are scalars 1222 1222 if isinstance(freqs[-1], int) or isinstance(freqs[-1], float): 1223 self._setrestfreqs(freqs, [""], unit)1223 self._setrestfreqs(freqs, [""], unit) 1224 1224 # list values are tuples, (value, name) 1225 1225 elif isinstance(freqs[-1], dict): … … 1233 1233 #self._setselection(savesel) 1234 1234 self._setrestfreqs(freqs["value"], 1235 freqs["name"], "MHz")1235 freqs["name"], unit) 1236 1236 elif isinstance(freqs[-1], list) or isinstance(freqs[-1], tuple): 1237 1237 sel = selector() … … 1243 1243 sel.set_ifs(iflist[i]) 1244 1244 self._setselection(sel) 1245 self._setrestfreqs(freqs[i]["value"], 1246 freqs[i]["name"], "MHz") 1245 self._setrestfreqs(freqs[i], [""], unit) 1247 1246 self._setselection(savesel) 1248 1247 # freqs are to be taken from a linecatalog … … 1540 1539 """ 1541 1540 Return a scan where all spectra have been binned up. 1542 1541 1543 1542 Parameters: 1544 1543 width: The bin width (default=5) in pixels … … 1734 1733 if mask is None: 1735 1734 mask = [True for i in xrange(self.nchan(-1))] 1736 1735 1737 1736 from asap.asapfitter import fitter 1738 1737 try: … … 1746 1745 if len(rows) > 0: 1747 1746 self.blpars = [] 1748 1747 1749 1748 for r in rows: 1750 1749 # take into account flagtra info (CAS-1434) … … 1779 1778 print_log() 1780 1779 if insitu: self._assign(workscan) 1781 else: return workscan 1780 else: return workscan 1782 1781 except RuntimeError: 1783 1782 msg = "The fit failed, possibly because it didn't converge." … … 1913 1912 f.data = None 1914 1913 f.fit() 1915 1914 1916 1915 # Show mask list 1917 1916 masklist=workscan.get_masklist(fl.get_mask(),row=r) … … 2416 2415 print_log() 2417 2416 return s 2418 2419
Note:
See TracChangeset
for help on using the changeset viewer.