Changeset 1271
- Timestamp:
- 09/13/06 12:06:07 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Release2.1.1b/python/asapfitter.py
r1232 r1271 493 493 xlab = 'Abcissa' 494 494 ylab = 'Ordinate' 495 from matplotlib.numerix import ma,logical_not,array 496 m = NUM.ones(len(self.x)) 497 495 from matplotlib.numerix import ma,logical_not,logical_and,array 496 m = self.mask 498 497 if self.data: 499 498 tlab = self.data._getsourcename(self._fittedrow) 500 499 xlab = self.data._getabcissalabel(self._fittedrow) 501 m = self.data._getmask(self._fittedrow) 500 m = logical_and(self.mask, 501 array(self.data._getmask(self._fittedrow)), 502 copy=False) 503 502 504 ylab = self.data._get_ordinate_label() 503 505 … … 505 507 self._p.palette(0,colours) 506 508 self._p.set_line(label='Spectrum') 507 y = ma.masked_array(self.y,mask=logical_not( array(m,copy=False)))509 y = ma.masked_array(self.y,mask=logical_not(m)) 508 510 self._p.plot(self.x, y) 509 511 if residual: … … 511 513 self._p.set_line(label='Residual') 512 514 y = ma.masked_array(self.get_residual(), 513 mask=logical_not( array(m,copy=False)))515 mask=logical_not(m)) 514 516 self._p.plot(self.x, y) 515 517 self._p.palette(2) … … 526 528 self._p.set_line(label=lab) 527 529 y = ma.masked_array(self.fitter.evaluate(c), 528 mask=logical_not( array(m,copy=False)))530 mask=logical_not(m)) 529 531 530 532 self._p.plot(self.x, y) … … 533 535 self._p.set_line(label="Total Fit") 534 536 y = ma.masked_array(self.fitter.getfit(), 535 mask=logical_not( array(m,copy=False)))537 mask=logical_not(m)) 536 538 self._p.plot(self.x, y) 537 539 else: … … 539 541 self._p.set_line(label='Fit') 540 542 y = ma.masked_array(self.fitter.getfit(), 541 mask=logical_not( array(m,copy=False)))543 mask=logical_not(m)) 542 544 self._p.plot(self.x, y) 543 545 xlim=[min(self.x),max(self.x)]
Note:
See TracChangeset
for help on using the changeset viewer.