Changeset 4995 for trunk/GSASIIstrMath.py
 Timestamp:
 Jul 12, 2021 10:19:22 AM (23 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIstrMath.py
r4992 r4995 1040 1040 Ginv = g/np.outer(ainv,ainv) 1041 1041 uAmat = G2lat.Gmat2AB(GS)[0] 1042 Bmat = G2lat.Gmat2AB(G)[1] 1042 1043 Mast = twopisq*np.multiply.outer(ast,ast) 1043 1044 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) … … 1048 1049 Nops *= (1+SGData['SGInv']) 1049 1050 MFtables = calcControls['MFtables'] 1050 Bmat = G2lat.Gmat2AB(G)[1]1051 1051 TwinLaw = np.ones(1) 1052 1052 # TwinLaw = np.array([[[1,0,0],[0,1,0],[0,0,1]],]) … … 1502 1502 GS = G/np.outer(ast,ast) 1503 1503 uAmat,uBmat = G2lat.Gmat2AB(GS) 1504 Amat,Bmat = G2lat.Gmat2AB(G) 1504 1505 Mast = twopisq*np.multiply.outer(ast,ast) 1505 1506 SGInv = SGData['SGInv'] … … 1514 1515 BLtables = calcControls['BLtables'] 1515 1516 MFtables = calcControls['MFtables'] 1516 Amat,Bmat = G2lat.Gmat2AB(G)1517 1517 Flack = 1.0 1518 1518 if not SGData['SGInv'] and 'S' in calcControls[hfx+'histType'] and phfx+'Flack' in parmDict: … … 1597 1597 FF = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,Uniq.shape[1],axis=0) 1598 1598 phase = twopi*(np.inner(Uniq[:,:,:3],(dXdata.T+Xdata.T))Phi[:,:,nxs]) 1599 # phase = np.hstack([phase for cen in SSCen])1600 1599 sinp = np.sin(phase) 1601 1600 cosp = np.cos(phase) … … 1613 1612 MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T #Nref,Natm 1614 1613 TMcorr = 0.539*(np.reshape(Tiso,Tuij.shape)*Tuij)[:,0,:]*Mdata*Fdata*MF/(2*Nops) #Nref,Natm 1615 HM = np.inner(Bmat,HP.T) #put into cartesian space XH,ZH*L; 1616 eM = (HM/np.sqrt(np.sum(HM**2,axis=0))).T # normalize HP Nref,hkl=Unit vectors  Q 1614 HM = np.inner(Bmat,HP.T) #put into cartesian space XH,ZH*L; 1615 Hlen = np.sqrt(np.sum(HM**2,axis=0)) 1616 eM = (HM/Hlen).T # normalize HP Nref,hkl=Unit vectors  Q 1617 1617 1618 1618 if not SGData['SGGray']: #correct fixed Mx,My,Mz contribution … … 1626 1626 H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])/2. #Nref,Ntau,Nops,Natm,Mxyz 1627 1627 1628 if not SGData['SGGray']: 1628 if not SGData['SGGray']: 1629 1629 fams += fam0[:,nxs,:,:,:] 1630 1630 fbms += fbm0[:,nxs,:,:,:] … … 1633 1633 fasm = np.sum(np.sum(fams,axis=2),axis=2) #Nref,Mxyz; sum ops & atoms 1634 1634 fbsm = np.sum(np.sum(fbms,axis=2),axis=2) 1635 # put into cartesian space1636 facm = np.inner(fasm,uAmat )1637 fbcm = np.inner(fbsm,uAmat )1635 # #put into cartesian space 1636 facm = np.inner(fasm,uAmat.T) 1637 fbcm = np.inner(fbsm,uAmat.T) 1638 1638 #form e.F dot product 1639 1639 eDotFa = np.sum(eM[:,nxs,:]*facm,axis=1) #Nref,Ntau
Note: See TracChangeset
for help on using the changeset viewer.