Changeset 1214
- Timestamp:
- 08/30/06 10:56:19 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Release2.1.0b/python/asapfitter.py
r1134 r1214 217 217 return 218 218 219 def set_gauss_parameters(self, peak, centre, f hwm,219 def set_gauss_parameters(self, peak, centre, fwhm, 220 220 peakfixed=0, centerfixed=0, 221 f hwmfixed=0,221 fwhmfixed=0, 222 222 component=0): 223 223 """ … … 227 227 peakfixed, 228 228 centerfixed, 229 f hwmfixed: Optional parameters to indicate if229 fwhmfixed: Optional parameters to indicate if 230 230 the paramters should be held fixed during 231 231 the fitting process. The default is to keep … … 242 242 raise ValueError(msg) 243 243 if 0 <= component < len(self.components): 244 d = {'params':[peak, centre, f hwm],245 'fixed':[peakfixed, centerfixed, f hwmfixed]}244 d = {'params':[peak, centre, fwhm], 245 'fixed':[peakfixed, centerfixed, fwhmfixed]} 246 246 self.set_parameters(d, component) 247 247 else: … … 479 479 xlab = 'Abcissa' 480 480 ylab = 'Ordinate' 481 m = None 481 from matplotlib.numerix import ma,logical_not,array 482 m = NUM.ones(len(self.x)) 483 482 484 if self.data: 483 485 tlab = self.data._getsourcename(self._fittedrow) … … 489 491 self._p.palette(0,colours) 490 492 self._p.set_line(label='Spectrum') 491 from matplotlib.numerix import ma,logical_not,array492 493 y = ma.masked_array(self.y,mask=logical_not(array(m,copy=False))) 493 494 self._p.plot(self.x, y)
Note:
See TracChangeset
for help on using the changeset viewer.