Changeset 4169
 Timestamp:
 Oct 3, 2019 12:27:43 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIstrMath.py
r4165 r4169 1603 1603 HM = np.inner(uBmat,HP.T) #put into cartesian space XH,ZH*L 1604 1604 eM = (HM/np.sqrt(np.sum(HM**2,axis=0))).T # normalize HP Nref,hkl=Unit vectors  Q 1605 # eDotK = np.inner(HM.T,Kdata) #Nref,Ntau,Nops,Natm1606 # Q = HM.T[:,nxs,nxs,nxs,:]*eDotK[:,:,:,:,nxs]Kdata[nxs,:,:,:,:] #Nref,Ntau,Nop,Nat,mxyz = BPM in magstrfc.for OK1607 Q = 1.1608 1605 #for fixed moments > m=0 reflections 1609 1606 fam0 = 0. … … 1625 1622 1626 1623 # do sum on ops, atms 1st 1627 fasm = np.sum(np.sum( Q*fams,axis=2),axis=2) #Nref,Ntau,Mxyz; sum ops & atoms1628 fbsm = np.sum(np.sum( Q*fbms,axis=2),axis=2)1624 fasm = np.sum(np.sum(fams,axis=2),axis=2) #Nref,Ntau,Mxyz; sum ops & atoms 1625 fbsm = np.sum(np.sum(fbms,axis=2),axis=2) 1629 1626 #put into cartesian space 1630 1627 facm = np.inner(fasm,uAmat.T) 1631 fbcm = np.inner(fbsm,uAmat.T) 1628 fbcm = np.inner(fbsm,uAmat.T) 1632 1629 #form e.F dot product 1633 1630 eDotFa = np.sum(eM[:,nxs,:]*facm,axis=1) #Nref,Ntau … … 1635 1632 #intensity 1636 1633 fass = np.sum(facm**2,axis=1)eDotFa**2 1637 fbss = np.sum(fbcm**2,axis=1)eDotFb**2 1634 fbss = np.sum(fbcm**2,axis=1)eDotFb**2 1638 1635 #do integration 1639 1636 fas = np.sum(glWt*fass,axis=1)/2. 1640 1637 fbs = np.sum(glWt*fbss,axis=1)/2. 1641 1638 1642 # fams = np.sum(fasm**2,axis=1)1643 # fbms = np.sum(fbsm**2,axis=1)1644 #1645 # fas = np.sum(glWt[nxs,:]*fams,axis=1)/2.1646 # fbs = np.sum(glWt[nxs,:]*fbms,axis=1)/2.1647 #1648 1639 refl.T[10] = fas+fbs #Sum(fams**2,Mxyz) Re + Im 1649 1640 refl.T[11] = atan2d(fbs,fas) # what is phase for mag refl?
Note: See TracChangeset
for help on using the changeset viewer.