Ignore:
Timestamp:
Jul 15, 2020 3:08:04 PM (17 months ago)
Author:
vondreele
Message:

complete pink Rietveld refinement
fix problem with weights
enhance testDeriv
put new pink parms in parm dictionary
fix problem with Instrument parm display after load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r4520 r4521  
    33393339#                        print ' ***Error %d,%d,%d missing from Pawley reflection list ***'%(h,k,l)
    33403340                        continue
    3341                 Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/100.,refl[7+im]/1.e4)
     3341                Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.)
    33423342                iBeg = np.searchsorted(x,refl[5+im]-fmin)
    33433343                iFin = np.searchsorted(x,refl[5+im]+fmax)
     
    35573557                Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im],refl[7+im])
    35583558            elif 'B' in calcControls[hfx+'histType']:
    3559                 Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im]/100.,refl[13+im]/1.e4,refl[6+im],refl[7+im])
     3559                Wd,fmin,fmax = G2pwd.getWidthsTOF(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.)
    35603560            iBeg = np.searchsorted(x,refl[5+im]-fmin)
    35613561            iFin = np.searchsorted(x,refl[5+im]+fmax)
     
    35933593                dMdipk = G2pwd.getdEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im],refl[7+im],ma.getdata(x[iBeg:iFin]))
    35943594                for i in range(6):
    3595                     dMdpk[i] += refl[11+im]*refl[9+im]*dMdipk[i]      #cw[iBeg:iFin]*
     3595                    dMdpk[i] += refl[11+im]*refl[9+im]*dMdipk[i]
    35963596                dervDict = {'int':dMdpk[0],'pos':dMdpk[1],'alp':dMdpk[2],'bet':dMdpk[3],'sig':dMdpk[4],'gam':dMdpk[5]}           
    35973597            elif 'B' in calcControls[hfx+'histType']:
     
    36023602                    break
    36033603                dMdpk = np.zeros(shape=(6,lenBF))
    3604                 dMdipk = G2pwd.getdEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/100.,refl[7+im]/1.e4,ma.getdata(x[iBeg:iFin]))
     3604                dMdipk = G2pwd.getdEpsVoigt(refl[5+im],refl[12+im],refl[13+im],refl[6+im]/1.e4,refl[7+im]/100.,ma.getdata(x[iBeg:iFin]))
    36053605                for i in range(6):
    3606                     dMdpk[i] += refl[11+im]*refl[9+im]*dMdipk[i]
    3607                 dervDict = {'int':dMdpk[0],'pos':dMdpk[1],'alp':dMdpk[2],'bet':dMdpk[3],'sig':dMdpk[4],'gam':dMdpk[5]}           
     3606                    dMdpk[i] = cw[iBeg:iFin]*refl[11+im]*refl[9+im]*dMdipk[i]
     3607                dervDict = {'int':dMdpk[0],'pos':dMdpk[1],'alp':dMdpk[2],'bet':dMdpk[3],'sig':dMdpk[4]/1.e4,'gam':dMdpk[5]/100.}           
    36083608            if Phase['General'].get('doPawley'):
    36093609                dMdpw = np.zeros(len(x))
     
    41074107            wdy = -ma.sqrt(w[xB:xF])*(yd[xB:xF])
    41084108            Histogram['Residuals']['Durbin-Watson'] = ma.sum(ma.diff(wdy)**2)/ma.sum(wdy**2)
    4109             wdy *= wtFactor
     4109            wdy *= np.sqrt(wtFactor)
    41104110            Histogram['Residuals']['Nobs'] = ma.count(x[xB:xF])
    41114111            Nobs += Histogram['Residuals']['Nobs']
Note: See TracChangeset for help on using the changeset viewer.