Ignore:
Timestamp:
Dec 21, 2021 2:46:05 PM (10 months ago)
Author:
vondreele
Message:

fixes to EDX calcs for LeBail?; start on Pawley for EDX.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r5114 r5116  
    28952895            pos -= const*(parmDict[hfx+'DisplaceX']*cosd(pos)+(parmDict[hfx+'DisplaceY']+parmDict[phfx+'LayerDisp'])*sind(pos))
    28962896    elif 'E' in calcControls[hfx+'histType']:
    2897         pos = G2mth.wavekE(2.0*d*sind(parmDict[hfx+'2-theta']/2.0))+parmDict[hfx+'ZE']+parmDict[hfx+'YE']*d+parmDict[hfx+'XE']*d**2
     2897        pos = 12.397639/(2.0*d*sind(parmDict[hfx+'2-theta']/2.0))+parmDict[hfx+'ZE']+parmDict[hfx+'YE']*d+parmDict[hfx+'XE']*d**2
    28982898    elif 'T' in calcControls[hfx+'histType']:
    28992899        pos = parmDict[hfx+'difC']*d+parmDict[hfx+'difA']*d**2+parmDict[hfx+'difB']/d+parmDict[hfx+'Zero']
     
    29382938        dpdXE = dsp**2
    29392939        dpdA = np.array([h**2,k**2,l**2,h*k,h*l,k*l])*refl[5+im]*dsp**2/2.
    2940         dpdTTh = -12.397639/(2.*tand(tth)*dsp*sind(tth))
     2940        dpdTTh = -12.397639*cosd(tth)/(dsp*sind(tth)**2)
    29412941        return dpdA,dpdTTh,dpdXE,dpdYE,dpdZE
    29422942    elif 'T' in calcControls[hfx+'histType']:
     
    29812981        return -180.*Dij*refl[4+im]**2*tand(refl[5+im]/2.0)/np.pi
    29822982    elif 'E' in calcControls[hfx+'histType']:
    2983         return Dij*(12.397639/(2.*dsp*sind(tth)))
     2983        return Dij*refl[5+im]/refl[4+im]**2
    29842984    else:
    29852985        return -Dij*parmDict[hfx+'difC']*0.5*refl[4+im]**2
     
    30173017    elif 'E' in calcControls[hfx+'histType']:
    30183018        for item in dDijDict:
    3019             dDijDict[item] *= refl[5+im]*refl[4+im]**2/2.
     3019            dDijDict[item] *= refl[5+im]/refl[4+im]**2
    30203020    else:
    30213021        for item in dDijDict:
     
    38003800            elif 'E' in calcControls[hfx+'histType']:
    38013801                dpdA,dpdTTh,dpdXE,dpdYE,dpdZE = GetReflPosDerv(refl,im,0.0,A,pfx,hfx,phfx,calcControls,parmDict)
    3802                 names = {hfx+'Scale':[dIdsh,'int'],
     3802                names = {hfx+'Scale':[dIdsh,'int'],hfx+'2-theta':[dpdTTh,'pos'],
    38033803                    hfx+'A':[refl[5+im]**2,'sig'],hfx+'B':[refl[5+im],'sig'],hfx+'C':[1.0,'sig'],
    38043804                    hfx+'XE':[dpdXE,'pos'],hfx+'YE':[dpdYE,'pos'],hfx+'ZE':[dpdZE,'pos']   }
Note: See TracChangeset for help on using the changeset viewer.