Changeset 4160
 Timestamp:
 Sep 27, 2019 2:47:19 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIstrMath.py
r4159 r4160 1509 1509 if parmDict[pfx+'isMag']: #This part correct for making modulated mag moments on equiv atoms 1510 1510 1511 mXYZ = np.array([[xyz[0] for xyz in list(G2spc.GenAtom(xyz,SGData,All=True,Move=True))] for xyz in (Xdata+dXdata).T]) %1.#Natn,Nop,xyz1511 mXYZ = np.array([[xyz[0] for xyz in list(G2spc.GenAtom(xyz,SGData,All=True,Move=True))] for xyz in (Xdata+dXdata).T]) #Natn,Nop,xyz 1512 1512 MmodA,MmodB = G2mth.MagMod(glTau,mXYZ,modQ,MSSdata,SGData,SSGData) #Ntau,Nops,Natm,Mxyz cos,sim parts sum matches drawing 1513 1513 Mmod = MmodA+MmodB … … 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,Natm 1606 # Q = HM.T[:,nxs,nxs,nxs,:]*eDotK[:,:,:,:,nxs]Kdata[nxs,:,:,:,:] #Nref,Ntau,Nop,Nat,mxyz = BPM in magstrfc.for OK 1607 Q = 1. 1605 1608 #for fixed moments > m=0 reflections 1606 1609 fam0 = 0. … … 1622 1625 1623 1626 # do sum on ops, atms 1st 1624 fasm = np.sum(np.sum( fams,axis=2),axis=2) #Nref,Ntau,Mxyz; sum ops & atoms1625 fbsm = np.sum(np.sum( fbms,axis=2),axis=2)1627 fasm = np.sum(np.sum(Q*fams,axis=2),axis=2) #Nref,Ntau,Mxyz; sum ops & atoms 1628 fbsm = np.sum(np.sum(Q*fbms,axis=2),axis=2) 1626 1629 #put into cartesian space 1627 1630 facm = np.inner(fasm,uAmat.T) … … 1637 1640 fbs = np.sum(glWt*fbss,axis=1)/2. 1638 1641 1639 refl.T[10] = fas+fbs 1640 refl.T[11] = atan2d(fbs,fas) 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 refl.T[10] = fas+fbs #Sum(fams**2,Mxyz) Re + Im 1649 refl.T[11] = atan2d(fbs,fas) # what is phase for mag refl? 1641 1650 1642 1651 else:
Note: See TracChangeset
for help on using the changeset viewer.