- Timestamp:
- 04/27/06 13:58:48 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapfitter.py
r1031 r1039 291 291 pars = list(self.fitter.getparameters()) 292 292 fixed = list(self.fitter.getfixedparameters()) 293 area = [] 293 294 if component is not None: 294 295 if self.fitfunc == "gauss": … … 296 297 cpars = pars[i:i+3] 297 298 cfixed = fixed[i:i+3] 299 a = self.get_area(component) 300 area = [a for i in range(3)] 298 301 else: 299 302 cpars = pars … … 302 305 cpars = pars 303 306 cfixed = fixed 304 fpars = self._format_pars(cpars, cfixed, self.get_area(component)) 307 if self.fitfunc == "gauss": 308 for c in range(len(self.components)): 309 a = self.get_area(c) 310 area += [a for i in range(3)] 311 312 fpars = self._format_pars(cpars, cfixed, area) 305 313 if rcParams['verbose']: 306 314 print fpars … … 326 334 ounit = self.data.get_fluxunit() 327 335 while i < len(pars): 328 if area:329 out += ' %2d: peak = %3.3f %s , centre = %3.3f %s, FWHM = %3.3f %s\n area = %3.3f %s %s\n' % (c,pars[i],ounit,pars[i+1],aunit,pars[i+2],aunit, area ,ounit,aunit)336 if len(area): 337 out += ' %2d: peak = %3.3f %s , centre = %3.3f %s, FWHM = %3.3f %s\n area = %3.3f %s %s\n' % (c,pars[i],ounit,pars[i+1],aunit,pars[i+2],aunit, area[i],ounit,aunit) 330 338 else: 331 339 out += ' %2d: peak = %3.3f %s , centre = %3.3f %s, FWHM = %3.3f %s\n' % (c,pars[i],ounit,pars[i+1],aunit,pars[i+2],aunit,ounit,aunit)
Note:
See TracChangeset
for help on using the changeset viewer.