Changeset 786 for branches/Release12
- Timestamp:
- 12/08/05 09:51:43 (19 years ago)
- Location:
- branches/Release12/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release12/python/asapfitter.py
r723 r786 432 432 print_log() 433 433 434 def auto_fit(self, insitu=None ):434 def auto_fit(self, insitu=None, allaxes=True): 435 435 """ 436 436 Return a scan where the function is applied to all rows for … … 454 454 rows = range(scan.nrow()) 455 455 from asap import asaplog 456 for i in range(scan.nbeam()): 457 scan.setbeam(i) 458 for j in range(scan.nif()): 459 scan.setif(j) 460 for k in range(scan.npol()): 461 scan.setpol(k) 462 asaplog.push("Fitting:") 463 out = 'Beam[%d], IF[%d], Pol[%d]' % (i,j,k) 464 asaplog.push(out) 465 for iRow in rows: 466 self.x = scan._getabcissa(iRow) 467 self.y = scan._getspectrum(iRow) 468 self.data = None 469 self.fit() 470 x = self.get_parameters() 471 scan._setspectrum(self.fitter.getresidual(),iRow) 456 if allaxes: 457 for i in range(scan.nbeam()): 458 scan.setbeam(i) 459 for j in range(scan.nif()): 460 scan.setif(j) 461 for k in range(scan.npol()): 462 scan.setpol(k) 463 asaplog.push("Fitting:") 464 out = 'Beam[%d], IF[%d], Pol[%d]' % (i,j,k) 465 asaplog.push(out) 466 for iRow in rows: 467 self.x = scan._getabcissa(iRow) 468 self.y = scan._getspectrum(iRow) 469 self.data = None 470 self.fit() 471 x = self.get_parameters() 472 scan._setspectrum(self.fitter.getresidual(),iRow) 473 else: 474 asaplog.push("Fitting:") 475 out = 'Beam[%d], IF[%d], Pol[%d]' % sel 476 asaplog.push(out) 477 for iRow in rows: 478 self.x = scan._getabcissa(iRow) 479 self.y = scan._getspectrum(iRow) 480 self.data = None 481 self.fit() 482 x = self.get_parameters() 483 scan._setspectrum(self.fitter.getresidual(),iRow) 484 472 485 scan.set_cursor(sel[0],sel[1],sel[2]) 473 486 print_log() -
branches/Release12/python/scantable.py
r785 r786 1083 1083 f.set_scan(self, mask) 1084 1084 f.set_function(poly=order) 1085 sf = f.auto_fit(insitu )1085 sf = f.auto_fit(insitu,allaxes) 1086 1086 if insitu: 1087 1087 self._add_history("poly_baseline", varlist)
Note:
See TracChangeset
for help on using the changeset viewer.