Changeset 3882
- Timestamp:
- Apr 9, 2019 12:40:30 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r3881 r3882 1598 1598 sinm = np.sin(phasem) 1599 1599 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,Natm1600 TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Fdata*Mdata*MF/(2.*Nops) #Nref,Natm 1601 1601 # 1602 1602 HM = np.inner(Bmat,HP.T) #put into cartesian space 1603 1603 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 1604 1616 #for modulated moments --> m != 0 reflections 1605 1617 M = np.array(np.abs(H[3]),dtype=np.int)-1 … … 1610 1622 fbmq = np.sum(np.sum(fbm/2.,axis=-2),axis=-2) 1611 1623 1612 fa s= np.sum(famq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*famq,axis=-1)**2 #mag intensity calc F^2-(e.F)^21613 fb s= np.sum(fbmq,axis=-1)**2-np.sum(eM.T[:,nxs,:]*fbmq,axis=-1)**21624 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 1614 1626 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)) 1617 1632 1618 1633 else:
Note: See TracChangeset
for help on using the changeset viewer.