Ignore:
Timestamp:
Apr 9, 2019 12:40:30 PM (5 years ago)
Author:
vondreele
Message:

mag. incomm. str. fctr.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r3881 r3882  
    15981598            sinm = np.sin(phasem)
    15991599            MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T   #Nref,Natm
    1600             TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Fdata*Mdata*MF/(Nops)     #Nref,Natm
     1600            TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Fdata*Mdata*MF/(2.*Nops)     #Nref,Natm
    16011601#                     
    16021602            HM = np.inner(Bmat,HP.T)                            #put into cartesian space
    16031603            eM = HM/np.sqrt(np.sum(HM**2,axis=0))               #& normalize
     1604#for fixed moments --> m=0 reflections
     1605            fas0 = 0.
     1606            fbs0 = 0.
     1607            if not SGData['SGGray']:                     
     1608                fam0 = TMcorr[:,nxs,:,nxs]*GSdata[nxs,:,:,:]*cosm[:,:,:,nxs]    #Nref,Nops,Natm,Mxyz
     1609                fbm0 = TMcorr[:,nxs,:,nxs]*GSdata[nxs,:,:,:]*sinm[:,:,:,nxs]   
     1610                           
     1611                famq0 = np.sum(np.sum(fam0,axis=-2),axis=-2)        #Nref,Mxyz; sum ops & atoms
     1612                fbmq0 = np.sum(np.sum(fbm0,axis=-2),axis=-2)
     1613               
     1614                fas0 = np.sum(famq0,axis=-1)**2-np.sum(eM.T*famq0,axis=-1)**2   #mag intensity calc F^2-(e.F)^2
     1615                fbs0 = np.sum(fbmq0,axis=-1)**2-np.sum(eM.T*fbmq0,axis=-1)**2
    16041616#for modulated moments --> m != 0 reflections
    16051617            M = np.array(np.abs(H[3]),dtype=np.int)-1
     
    16101622            fbmq = np.sum(np.sum(fbm/2.,axis=-2),axis=-2)
    16111623           
    1612             fas = np.sum(famq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*famq,axis=-1)**2      #mag intensity calc F^2-(e.F)^2
    1613             fbs = np.sum(fbmq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*fbmq,axis=-1)**2
     1624            fa = np.sum(famq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*famq,axis=-1)**2      #mag intensity calc F^2-(e.F)^2
     1625            fb = np.sum(fbmq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*fbmq,axis=-1)**2
    16141626           
    1615             refl.T[10] = np.sum(fas*glWt,axis=1)+np.sum(fbs*glWt,axis=1)    #square of sums
    1616             refl.T[11] = atan2d(fbs[:,0],fas[:,0])  #ignore f' & f"
     1627            fas = np.sum(fa*glWt,axis=1)
     1628            fbs = np.sum(fb*glWt,axis=1)
     1629           
     1630            refl.T[10] = np.where(H[3],fas+fbs,fas0+fbs0)
     1631            refl.T[11] = np.where(H[3],atan2d(fbs,fas),atan2d(fbs0,fas0))
    16171632
    16181633        else:
Note: See TracChangeset for help on using the changeset viewer.