Changeset 159
- Timestamp:
- 12/26/04 22:42:54 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapfitter.py
r158 r159 251 251 def auto_fit(self): 252 252 """ 253 Return a scan where the function is applied to all Beams/IFs/Pols.253 Return a scan where the function is applied to all rows for all Beams/IFs/Pols. 254 254 255 255 """ … … 262 262 scan._verbose(False) 263 263 sel = scan.get_selection() 264 rows = range(scan.nrow()) 264 265 for i in range(scan.nbeam()): 265 266 scan.setbeam(i) … … 268 269 for k in range(scan.npol()): 269 270 scan.setpol(k) 270 self.x = scan.getabcissa()271 self.y = scan.getspectrum()272 self.data = None273 self.fit()274 271 if self._vb: 275 272 print "Fitting:" 276 273 print 'Beam[%d], IF[%d], Pol[%d]' % (i,j,k) 274 for iRow in rows: 275 self.x = scan.getabcissa(iRow) 276 self.y = scan.getspectrum(iRow) 277 self.data = None 278 self.fit() 277 279 x = self.get_parameters() 278 scan.setspectrum(self.fitter.getresidual())280 scan.setspectrum(self.fitter.getresidual(),iRow) 279 281 scan.set_selection(sel[0],sel[1],sel[2]) 280 282 scan._verbose(vb) 281 283 return scan 282
Note:
See TracChangeset
for help on using the changeset viewer.