Changeset 1217 for trunk/python/scantable.py
- Timestamp:
- 08/30/06 13:29:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r1203 r1217 923 923 Otherwise, the scaling is done in-situ 924 924 The default is taken from .asaprc (False) 925 allaxes: if True apply to all spectra. Otherwise926 apply only to the selected (beam/pol/if)spectra only927 The default is taken from .asaprc (True if none)928 925 """ 929 926 if insitu is None: insitu = rcParams['insitu'] … … 1184 1181 mask = list(NUM.ones(self.nchan(-1))) 1185 1182 from asap.asapfitter import fitter 1186 f = fitter() 1187 f.set_scan(self, mask) 1188 f.set_function(poly=order) 1189 s = f.auto_fit(insitu, plot=plot) 1190 s._add_history("poly_baseline", varlist) 1191 print_log() 1192 if insitu: self._assign(s) 1193 else: return s 1183 try: 1184 f = fitter() 1185 f.set_scan(self, mask) 1186 f.set_function(poly=order) 1187 s = f.auto_fit(insitu, plot=plot) 1188 s._add_history("poly_baseline", varlist) 1189 print_log() 1190 if insitu: self._assign(s) 1191 else: return s 1192 except RuntimeError: 1193 msg = "The fit failed, possibly because it didn't converge." 1194 if rcParams['verbose']: 1195 print msg 1196 return 1197 else: 1198 raise RuntimeError(msg) 1199 1194 1200 1195 1201 def auto_poly_baseline(self, mask=[], edge=(0, 0), order=0, … … 1433 1439 preserve: Output = Toff * (on/off) - Toff 1434 1440 remove: Output = Toff * (on/off) - Ton 1435 """1441 """ 1436 1442 if mask is None: mask = () 1437 1443 varlist = vars() … … 1439 1445 preoff = scantable(self._math._mx_extract(self, 'off')) 1440 1446 off = preoff.average_time(mask=mask, weight=weight, scanav=False) 1441 from asapmath import quotient1447 from asapmath import quotient 1442 1448 q = quotient(on, off, preserve) 1443 1449 q._add_history("mx_quotient", varlist) 1444 1450 print_log() 1445 return q1451 return q 1446 1452 1447 1453 def freq_switch(self, insitu=None):
Note: See TracChangeset
for help on using the changeset viewer.