Changeset 4997 for trunk/GSASIImath.py
 Timestamp:
 Jul 16, 2021 9:21:10 AM (23 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIImath.py
r4990 r4997 1751 1751 psin = np.sin(twopi*phase) 1752 1752 pcos = np.cos(twopi*phase) 1753 MmodA = Am[nxs,nxs,:,:]*pcos[:,:,:,nxs] #cos term 1754 MmodB = Bm[nxs,nxs,:,:]*psin[:,:,:,nxs] #sin term 1755 MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=1)*SGData['SpnFlp'][nxs,:,nxs,nxs] 1756 MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=1)*SGData['SpnFlp'][nxs,:,nxs,nxs] 1757 return MmodA,MmodB #Ntau,Nops,Natm,Mxyz; cos & sin parts; sum matches drawn atom moments 1753 MmodAR = Am[nxs,nxs,:,:]*pcos[:,:,:,nxs] #cos term 1754 MmodBR = Bm[nxs,nxs,:,:]*psin[:,:,:,nxs] #sin term 1755 MmodAR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAR[:,:,:,nxs,:],axis=1) 1756 MmodBR = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBR[:,:,:,nxs,:],axis=1) 1757 MmodAI = Am[nxs,nxs,:,:]*psin[:,:,:,nxs] #cos term 1758 MmodBI = Bm[nxs,nxs,:,:]*pcos[:,:,:,nxs] #sin term 1759 MmodAI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodAI[:,:,:,nxs,:],axis=1) 1760 MmodBI = np.sum(SGMT[nxs,:,nxs,:,:]*MmodBI[:,:,:,nxs,:],axis=1) 1761 return MmodAR,MmodBR,MmodAI,MmodBI #Ntau,Nops,Natm,Mxyz; cos & sin parts; sum matches drawn atom moments 1758 1762 1759 1763 def Modulation(H,HP,nWaves,Fmod,Xmod,Umod,glTau,glWt):
Note: See TracChangeset
for help on using the changeset viewer.