Ignore:
Timestamp:
Aug 6, 2013 9:10:46 PM (9 years ago)
Author:
vondreele
Message:

implement excluded regions - 1st attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r990 r1017  
    17401740            dMdvh = getPowderProfileDerv(parmDict,x[xB:xF],
    17411741                varylist,Histogram,Phases,rigidbodyDict,calcControls,pawleyLookup)
    1742             Wt = np.sqrt(W[xB:xF])[np.newaxis,:]
     1742            Wt = ma.sqrt(W[xB:xF])[np.newaxis,:]
    17431743            Dy = dy[xB:xF][np.newaxis,:]
    17441744            dMdvh *= Wt
     
    18781878            xB = np.searchsorted(x,Limits[0])
    18791879            xF = np.searchsorted(x,Limits[1])
    1880             Histogram['Nobs'] = xF-xB
     1880            Histogram['Nobs'] = ma.count(x[xB:xF])
    18811881            Nobs += Histogram['Nobs']
    1882             Histogram['sumwYo'] = np.sum(W[xB:xF]*y[xB:xF]**2)
     1882            Histogram['sumwYo'] = ma.sum(W[xB:xF]*y[xB:xF]**2)
    18831883            SumwYo += Histogram['sumwYo']
    18841884            yc[xB:xF],yb[xB:xF] = getPowderProfile(parmDict,x[xB:xF],
     
    18861886            yc[xB:xF] += yb[xB:xF]
    18871887            yd[xB:xF] = y[xB:xF]-yc[xB:xF]
    1888             Histogram['sumwYd'] = np.sum(np.sqrt(W[xB:xF])*(yd[xB:xF]))
    1889             wdy = -np.sqrt(W[xB:xF])*(yd[xB:xF])
    1890             Histogram['wR'] = min(100.,np.sqrt(np.sum(wdy**2)/Histogram['sumwYo'])*100.)
     1888            Histogram['sumwYd'] = ma.sum(np.sqrt(W[xB:xF])*(yd[xB:xF]))
     1889            wdy = -ma.sqrt(W[xB:xF])*(yd[xB:xF])
     1890            Histogram['wR'] = min(100.,ma.sqrt(ma.sum(wdy**2)/Histogram['sumwYo'])*100.)
    18911891            if dlg:
    18921892                dlg.Update(Histogram['wR'],newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['wR'],'%'))[0]
Note: See TracChangeset for help on using the changeset viewer.