Ignore:
Timestamp:
Feb 28, 2015 9:16:41 AM (7 years ago)
Author:
vondreele
Message:

do sums of Bragg intensity, and background terms put results into .lst file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r1676 r1682  
    17721772                sumFosq = 0.0
    17731773                sumdFsq = 0.0
     1774                sumInt = 0.0
    17741775                for refl in refDict['RefList']:
    17751776                    if 'C' in calcControls[hfx+'histType']:
     
    17851786                        elif iBeg < iFin:
    17861787                            yp[iBeg:iFin] = refl[11+im]*refl[9+im]*G2pwd.getFCJVoigt3(refl[5+im],refl[6+im],refl[7+im],shl,ma.getdata(x[iBeg:iFin]))    #>90% of time spent here
     1788                            sumInt += refl[11+im]*refl[9+im]
    17871789                            if Ka2:
    17881790                                pos2 = refl[5+im]+lamRatio*tand(refl[5+im]/2.0)       # + 360/pi * Dlam/lam * tan(th)
     
    17911793                                iFin2 = min(np.searchsorted(x,pos2+fmax),xF)
    17921794                                yp[iBeg2:iFin2] += refl[11+im]*refl[9+im]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6+im],refl[7+im],shl,ma.getdata(x[iBeg2:iFin2]))        #and here
     1795                                sumInt += refl[11+im]*refl[9+im]*kRatio
    17931796                            refl[8+im] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[11+im]*(1.+kRatio)),0.0))
     1797                               
    17941798                    elif 'T' in calcControls[hfx+'histType']:
    17951799                        yp = np.zeros_like(yb)
     
    18001804                            yp[iBeg:iFin] = refl[11+im]*refl[9+im]*G2pwd.getEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im],refl[7+im],ma.getdata(x[iBeg:iFin]))  #>90% of time spent here
    18011805                            refl[8+im] = np.sum(np.where(ratio[iBeg:iFin]>0.,yp[iBeg:iFin]*ratio[iBeg:iFin]/refl[11+im],0.0))
     1806                            sumInt += refl[11+im]*refl[9+im]
    18021807                    Fo = np.sqrt(np.abs(refl[8+im]))
    18031808                    Fc = np.sqrt(np.abs(refl[9]+im))
     
    18121817                    Histogram['Residuals'][phfx+'Rf'] = 100.
    18131818                    Histogram['Residuals'][phfx+'Rf^2'] = 100.
     1819                Histogram['Residuals'][phfx+'sumInt'] = sumInt
    18141820                Histogram['Residuals'][phfx+'Nref'] = len(refDict['RefList'])
    18151821                Histogram['Residuals']['hId'] = hId
     
    18521858    hfx = ':%d:'%(hId)
    18531859    bakType = calcControls[hfx+'bakType']
    1854     yb = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x)
     1860    yb,Histogram['sumBk'] = G2pwd.getBackground(hfx,parmDict,bakType,calcControls[hfx+'histType'],x)
    18551861    yc = np.zeros_like(yb)
    18561862    cw = np.diff(x)
Note: See TracChangeset for help on using the changeset viewer.