Changeset 4057
 Timestamp:
 Jul 11, 2019 1:03:41 PM (4 years ago)
 Location:
 trunk
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIImath.py
r4055 r4057 1406 1406 this needs to make magnetic moment modulations & magnitudes 1407 1407 ''' 1408 Am = np.array(MSSdata[:3]).T #atoms x waves x sin posmods1409 Bm = np.array(MSSdata[3:]).T #...cos posmods1408 Am = np.array(MSSdata[:3]).T #atoms x waves x sin mag mods 1409 Bm = np.array(MSSdata[3:]).T #...cos mag mods 1410 1410 nWaves = Am.shape[1] 1411 1411 if not nWaves: … … 1427 1427 psin = np.sin(twopi*phase) #Nops,Natm 1428 1428 pcos = np.cos(twopi*phase) 1429 MmodB = np.sum(Bm[nxs,:,:,:]*pcos[:,:,nxs,nxs],axis=2) #Nops,Natm,3 1430 MmodA = np.sum(Am[nxs,:,:,:]*psin[:,:,nxs,nxs],axis=2) 1431 MmodA = np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=1)*SGData['MagMom'][:,nxs,nxs] 1432 MmodB = np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=1)*SGData['MagMom'][:,nxs,nxs] 1429 MmodA = np.sum(Am[nxs,:,:,:]*psin[:,:,nxs,nxs],axis=2) #Nops,Natm,3 1430 MmodB = np.sum(Bm[nxs,:,:,:]*pcos[:,:,nxs,nxs],axis=2) 1431 MmodA = np.sum(SGMT[:,nxs,:,:]*MmodA[:,:,nxs,:],axis=1) 1432 MmodB = np.sum(SGMT[:,nxs,:,:]*MmodB[:,:,nxs,:],axis=1) 1433 MmodA = MmodA*SGData['MagMom'][:,nxs,nxs] 1434 MmodB = MmodB*SGData['MagMom'][:,nxs,nxs] 1433 1435 return MmodA,MmodB #Nops,Natm,,Mxyz; sin & cos parts 1434 1436 
trunk/GSASIIstrMath.py
r4055 r4057 1482 1482 phfx = pfx.split(':')[0]+hfx 1483 1483 ast = np.sqrt(np.diag(G)) 1484 GS = G/np.outer(ast,ast)1485 uAmat = G2lat.Gmat2AB(GS)[0]1484 # GS = G/np.outer(ast,ast) 1485 # uAmat = G2lat.Gmat2AB(GS)[0] 1486 1486 Mast = twopisq*np.multiply.outer(ast,ast) 1487 1487 SGInv = SGData['SGInv'] … … 1513 1513 1514 1514 if not SGData['SGGray']: #for fixed Mx,My,Mz 1515 Mmod += Gdata.T[:,nxs,:]1515 # Mmod += Gdata.T[:,nxs,:] 1516 1516 GSdata = np.inner(Gdata.T,np.swapaxes(SGMT,1,2)) #apply sym. ops.> Natm,Nops,Nxyz 1517 1517 if SGData['SGInv'] and not SGData['SGFixed']: #inversion if any
Note: See TracChangeset
for help on using the changeset viewer.