Changeset 4182
- Timestamp:
- Oct 18, 2019 3:01:27 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r4176 r4182 1378 1378 Sinv = np.vstack([Sinv for cen in SGData['SGCen']]) 1379 1379 SGT = np.vstack([SGT+cen for cen in SSGData['SSGCen']])%1. 1380 if SGData['SGGray']: 1381 SGMT = np.vstack((SGMT,SGMT)) 1382 Sinv =np.vstack((Sinv,Sinv)) 1383 SGT = np.vstack((SGT,SGT+.5))%1. 1380 1384 detSM = nl.det(SGMT) 1381 1385 mst = Sinv[:,3,:3] … … 1390 1394 MmodA = np.sum(Am[nxs,nxs,:,:,:]*pcos[:,:,:,nxs,nxs],axis=3) #cos term 1391 1395 MmodB = np.sum(Bm[nxs,nxs,:,:,:]*psin[:,:,:,nxs,nxs],axis=3) #sin term 1392 if SGData['SGGray']:1393 MmodA = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]1394 MmodB = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs]1395 else:1396 1397 1396 # if SGData['SGGray']: 1397 # MmodA = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs] 1398 # MmodB = -np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*detSM[nxs,:,nxs,nxs] 1399 # else: 1400 MmodA = np.sum(SGMT[nxs,:,nxs,:,:]*MmodA[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs] 1401 MmodB = np.sum(SGMT[nxs,:,nxs,:,:]*MmodB[:,:,:,nxs,:],axis=-1)*SGData['MagMom'][nxs,:,nxs,nxs] 1398 1402 return MmodB,MmodA #Ntau,Nops,Natm,,Mxyz; cos & sin parts; sum matches drawn atom moments 1399 1403 -
trunk/GSASIIstrMath.py
r4175 r4182 1489 1489 Ncen = len(SGData['SGCen']) 1490 1490 Nops = len(SGMT)*(1+SGData['SGInv']) 1491 if SGData['SGGray']: 1492 Nops *= 2 1491 1493 SSGMT = np.array([ops[0].T for ops in SSGData['SSGOps']]) 1492 1494 SSGT = np.array([ops[1] for ops in SSGData['SSGOps']]) … … 1510 1512 1511 1513 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 1514 if SGData['SGGray']: 1515 mXYZ = np.hstack((mXYZ,mXYZ)) 1512 1516 MmodA,MmodB = G2mth.MagMod(glTau,mXYZ,modQ,MSSdata,SGData,SSGData) #Ntau,Nops,Natm,Mxyz cos,sim parts sum matches drawing 1513 1517 Mmod = MmodA+MmodB … … 1636 1640 fass = np.sum(facm**2,axis=-1)-eDotFa**2 1637 1641 fbss = np.sum(fbcm**2,axis=-1)-eDotFb**2 1638 #do integration 1642 #do integration 1643 1639 1644 fas = np.sum(glWt*fass,axis=1)/2. 1640 1645 fbs = np.sum(glWt*fbss,axis=1)/2. 1641 1646 1647 if SGData['SGInv']: 1648 fbs *= 4. 1649 fas = 0. 1650 1642 1651 refl.T[10] = fas+fbs #Sum(fams**2,Mxyz) Re + Im 1643 refl.T[11] = atan2d(fbs,fas) #- what is phase for mag refl?1652 refl.T[11] = atan2d(fbs,fas) 1644 1653 1645 1654 else:
Note: See TracChangeset
for help on using the changeset viewer.