Ignore:
Timestamp:
Jun 2, 2015 2:36:58 PM (7 years ago)
Author:
vondreele
Message:

add Flack parameter to GUI (commented out for now)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r1874 r1875  
    856856            FPP = np.repeat(FPP.T,len(SGT),axis=0)
    857857        Bab = np.repeat(parmDict[phfx+'BabA']*np.exp(-parmDict[phfx+'BabU']*SQfactor),len(SGT))
     858        Flack = 1.-2.*parmDict[phfx+'Flack']
    858859        Tindx = np.array([refDict['FF']['El'].index(El) for El in Tdata])
    859860        FF = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,len(SGT),axis=0)
     
    868869        Tuij = np.where(HbH<1.,np.exp(HbH),1.0).T
    869870        Tcorr = Tiso*Tuij*Mdata*Fdata/len(SGMT)
    870         fa = np.array([((FF+FP).T-Bab).T*cosp*Tcorr,-FPP*sinp*Tcorr])
     871        fa = np.array([((FF+FP).T-Bab).T*cosp*Tcorr,-Flack*FPP*sinp*Tcorr])
    871872        fa = np.reshape(fa,(2,len(refl),len(SGT),len(Mdata)))   #real A,-b
    872873        fas = np.sum(np.sum(fa,axis=2),axis=2)        #real sum over atoms & unique hkl
    873         fb = np.array([((FF+FP).T-Bab).T*sinp*Tcorr,FPP*cosp*Tcorr])
     874        fb = np.array([((FF+FP).T-Bab).T*sinp*Tcorr,Flack*FPP*cosp*Tcorr])
    874875        fb = np.reshape(fb,(2,len(refl),len(SGT),len(Mdata)))   #imag -B,+a
    875876        fbs = np.sum(np.sum(fb,axis=2),axis=2)  #imag sum over atoms & uniq hkl
     
    933934        Tuij = np.where(HbH<1.,np.exp(HbH),1.0)
    934935        Tcorr = Tiso*Tuij
     936        Flack = (1.-2.*parmDict[phfx+'Flack'])
    935937        fot = (FF+FP-Bab)*occ*Tcorr
    936         fotp = FPP*occ*Tcorr
     938        fotp = Flack*FPP*occ*Tcorr
    937939        fa = np.array([fot[:,np.newaxis]*cosp,fotp[:,np.newaxis]*cosp])       #non positions
    938940        fb = np.array([fot[:,np.newaxis]*sinp,-fotp[:,np.newaxis]*sinp])
Note: See TracChangeset for help on using the changeset viewer.