Changeset 1856
- Timestamp:
- 08/05/10 10:24:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1855 r1856 145 145 self.parallactify(parallactify) 146 146 self._add_history("scantable", varlist) 147 print_log()148 147 149 148 @print_log_dec … … 204 203 writer = stw(format2) 205 204 writer.write(self, name) 206 print_log()207 205 return 208 206 … … 237 235 if not _is_valid(scanid): 238 236 if rcParams['verbose']: 239 #print "Please specify a scanno to drop from the scantable"240 237 asaplog.push( 'Please specify a scanno to drop from the scantable' ) 241 238 print_log( 'ERROR' ) … … 251 248 except ValueError: 252 249 if rcParams['verbose']: 253 #print "Couldn't find any match."254 250 print_log() 255 251 asaplog.push( "Couldn't find any match." ) … … 262 258 except RuntimeError: 263 259 if rcParams['verbose']: 264 #print "Couldn't find any match."265 260 print_log() 266 261 asaplog.push( "Couldn't find any match." ) … … 887 882 self._setInstrument(instr) 888 883 self._add_history("set_instument", vars()) 889 print_log()890 884 891 885 @print_log_dec … … 901 895 self._setfeedtype(feedtype) 902 896 self._add_history("set_feedtype", vars()) 903 print_log()904 897 905 898 @print_log_dec … … 918 911 self._setcoordinfo(inf) 919 912 self._add_history("set_doppler", vars()) 920 print_log()921 913 922 914 @print_log_dec … … 957 949 else: 958 950 raise TypeError(msg) 959 print_log()960 951 961 952 def set_dirframe(self, frame=""): … … 1000 991 return unit 1001 992 993 @print_log_dec 1002 994 def get_abcissa(self, rowno=0): 1003 995 """\ … … 1017 1009 abc = self._getabcissa(rowno) 1018 1010 lbl = self._getabcissalabel(rowno) 1019 print_log()1020 1011 return abc, lbl 1021 1012 … … 1142 1133 else: raise 1143 1134 s._add_history("lag_flag", varlist) 1144 print_log()1145 1135 if insitu: 1146 1136 self._assign(s) … … 1218 1208 if kwargs.get('invert'): 1219 1209 msk = mask_not(msk) 1220 print_log()1221 1210 return msk 1222 1211 … … 1586 1575 else: raise 1587 1576 s._add_history("average_time", varlist) 1588 print_log()1589 1577 return s 1590 1578 … … 1620 1608 s = scantable(self._math._convertflux(self, d, eta, jyperk)) 1621 1609 s._add_history("convert_flux", varlist) 1622 print_log()1623 1610 if insitu: self._assign(s) 1624 1611 else: return s … … 1679 1666 s = scantable(self._math._gainel(self, poly, filename, method)) 1680 1667 s._add_history("gain_el", varlist) 1681 print_log()1682 1668 if insitu: 1683 1669 self._assign(s) … … 1712 1698 s = scantable(self._math._freq_align(self, reftime, method)) 1713 1699 s._add_history("freq_align", varlist) 1714 print_log()1715 1700 if insitu: self._assign(s) 1716 1701 else: return s … … 1745 1730 s = scantable(self._math._opacity(self, tau)) 1746 1731 s._add_history("opacity", varlist) 1747 print_log()1748 1732 if insitu: self._assign(s) 1749 1733 else: return s … … 1768 1752 s = scantable(self._math._bin(self, width)) 1769 1753 s._add_history("bin", varlist) 1770 print_log()1771 1754 if insitu: 1772 1755 self._assign(s) … … 1797 1780 s = scantable(self._math._resample(self, method, width)) 1798 1781 s._add_history("resample", varlist) 1799 print_log()1800 1782 if insitu: self._assign(s) 1801 1783 else: return s … … 1820 1802 s = scantable(self._math._averagepol(self, mask, weight.upper())) 1821 1803 s._add_history("average_pol", varlist) 1822 print_log()1823 1804 return s 1824 1805 … … 1841 1822 s = scantable(self._math._averagebeams(self, mask, weight.upper())) 1842 1823 s._add_history("average_beam", varlist) 1843 print_log()1844 1824 return s 1845 1825 … … 1884 1864 raise 1885 1865 s._add_history("convert_pol", varlist) 1886 print_log()1887 1866 return s 1888 1867 … … 1962 1941 del orgscan 1963 1942 1964 print_log()1965 1943 if insitu: self._assign(s) 1966 1944 else: return s … … 2046 2024 f._p = None 2047 2025 workscan._add_history("poly_baseline", varlist) 2048 print_log() 2049 if insitu: self._assign(workscan) 2050 else: return workscan 2026 if insitu: 2027 self._assign(workscan) 2028 else: 2029 return workscan 2051 2030 except RuntimeError: 2052 2031 msg = "The fit failed, possibly because it didn't converge." … … 2237 2216 self._math._rotate_linpolphase(self, angle) 2238 2217 self._add_history("rotate_linpolphase", varlist) 2239 print_log()2240 2218 return 2241 2219 … … 2259 2237 self._math._rotate_xyphase(self, angle) 2260 2238 self._add_history("rotate_xyphase", varlist) 2261 print_log()2262 2239 return 2263 2240 … … 2271 2248 self._math._swap_linears(self) 2272 2249 self._add_history("swap_linears", varlist) 2273 print_log()2274 2250 return 2275 2251 … … 2340 2316 s = scantable(self._math._unaryop(self.copy(), factor, "MUL", tsys)) 2341 2317 s._add_history("scale", varlist) 2342 print_log()2343 2318 if insitu: 2344 2319 self._assign(s) … … 2431 2406 s = scantable(self._math._auto_quotient(self, mode, preserve)) 2432 2407 s._add_history("auto_quotient", varlist) 2433 print_log()2434 2408 return s 2435 2409 … … 2461 2435 q = quotient(on, off, preserve) 2462 2436 q._add_history("mx_quotient", varlist) 2463 print_log()2464 2437 return q 2465 2438 … … 2481 2454 s = scantable(self._math._freqswitch(self)) 2482 2455 s._add_history("freq_switch", varlist) 2483 print_log() 2484 if insitu: self._assign(s) 2485 else: return s 2456 if insitu: 2457 self._assign(s) 2458 else: 2459 return s 2486 2460 2487 2461 @print_log_dec … … 2491 2465 self._recalcazel() 2492 2466 self._add_history("recalc_azel", varlist) 2493 print_log()2494 2467 return 2495 2468 … … 2558 2531 return s 2559 2532 2533 @print_log_dec 2560 2534 def get_fit(self, row=0): 2561 2535 """\ … … 2574 2548 #print fit 2575 2549 asaplog.push( '%s' %(fit) ) 2576 print_log()2577 2550 return 2578 2551 else:
Note:
See TracChangeset
for help on using the changeset viewer.