Changeset 1116
- Timestamp:
- 08/04/06 16:27:27 (18 years ago)
- Location:
- trunk/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapfitter.py
r1094 r1116 492 492 self._p.set_line(label='Spectrum') 493 493 from matplotlib.numerix import ma,logical_not,array 494 y = ma. MA.MaskedArray(self.y,mask=logical_not(array(m,copy=0)),copy=0)494 y = ma.masked_array(self.y,mask=logical_not(array(m,copy=False))) 495 495 self._p.plot(self.x, y) 496 496 if residual: 497 497 self._p.palette(1) 498 498 self._p.set_line(label='Residual') 499 y = ma. MA.MaskedArray(self.get_residual(),500 mask=logical_not(array(m,copy= 0)),copy=0)499 y = ma.masked_array(self.get_residual(), 500 mask=logical_not(array(m,copy=False))) 501 501 self._p.plot(self.x, y) 502 502 self._p.palette(2) … … 512 512 lab = self.fitfuncs[c]+str(c) 513 513 self._p.set_line(label=lab) 514 y = ma.MA.MaskedArray(self.fitter.evaluate(c), 515 mask=logical_not(array(m,copy=0)), 516 copy=0) 514 y = ma.masked_array(self.fitter.evaluate(c), 515 mask=logical_not(array(m,copy=False))) 517 516 518 517 self._p.plot(self.x, y) … … 520 519 self._p.palette(2) 521 520 self._p.set_line(label="Total Fit") 522 y = ma.MA.MaskedArray(self.fitter.getfit(), 523 mask=logical_not(array(m,copy=0)), 524 copy=0) 521 y = ma.masked_array(self.fitter.getfit(), 522 mask=logical_not(array(m,copy=False))) 525 523 self._p.plot(self.x, y) 526 524 else: 527 525 self._p.palette(2) 528 526 self._p.set_line(label='Fit') 529 y = ma.MA.MaskedArray(self.fitter.getfit(), 530 mask=logical_not(array(m,copy=0)), 531 copy=0) 527 y = ma.masked_array(self.fitter.getfit(), 528 mask=logical_not(array(m,copy=False))) 532 529 self._p.plot(self.x, y) 533 530 xlim=[min(self.x),max(self.x)] -
trunk/python/asapplotter.py
r1101 r1116 519 519 m = logical_and(m, self._usermask) 520 520 x = scan._getabcissa(r) 521 from matplotlib.numerix import ma, logical_not,array522 y = ma. MA.MaskedArray(y,mask=logical_not(array(m,copy=0)),copy=0)521 from matplotlib.numerix import ma, logical_not, array 522 y = ma.masked_array(y,mask=logical_not(array(m,copy=False))) 523 523 if self._minmaxx is not None: 524 524 s,e = self._slice_indeces(x) … … 543 543 xlim= self._minmaxx or [min(x),max(x)] 544 544 allxlim += xlim 545 ylim= self._minmaxy or [ma. MA.minimum(y),ma.MA.maximum(y)]545 ylim= self._minmaxy or [ma.minimum(y),ma.maximum(y)] 546 546 allylim += ylim 547 547 stackcount += 1
Note:
See TracChangeset
for help on using the changeset viewer.