Changeset 4995


Ignore:
Timestamp:
Jul 12, 2021 10:19:22 AM (5 months ago)
Author:
vondreele
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r4992 r4995  
    10401040    Ginv = g/np.outer(ainv,ainv)
    10411041    uAmat = G2lat.Gmat2AB(GS)[0]
     1042    Bmat = G2lat.Gmat2AB(G)[1]
    10421043    Mast = twopisq*np.multiply.outer(ast,ast)
    10431044    SGMT = np.array([ops[0].T for ops in SGData['SGOps']])
     
    10481049        Nops *= (1+SGData['SGInv'])
    10491050    MFtables = calcControls['MFtables']
    1050     Bmat = G2lat.Gmat2AB(G)[1]
    10511051    TwinLaw = np.ones(1)
    10521052#    TwinLaw = np.array([[[1,0,0],[0,1,0],[0,0,1]],])
     
    15021502    GS = G/np.outer(ast,ast)
    15031503    uAmat,uBmat = G2lat.Gmat2AB(GS)
     1504    Amat,Bmat = G2lat.Gmat2AB(G)
    15041505    Mast = twopisq*np.multiply.outer(ast,ast)   
    15051506    SGInv = SGData['SGInv']
     
    15141515    BLtables = calcControls['BLtables']
    15151516    MFtables = calcControls['MFtables']
    1516     Amat,Bmat = G2lat.Gmat2AB(G)
    15171517    Flack = 1.0
    15181518    if not SGData['SGInv'] and 'S' in calcControls[hfx+'histType'] and phfx+'Flack' in parmDict:
     
    15971597        FF = np.repeat(refDict['FF']['FF'][iBeg:iFin].T[Tindx].T,Uniq.shape[1],axis=0)
    15981598        phase = twopi*(np.inner(Uniq[:,:,:3],(dXdata.T+Xdata.T))-Phi[:,:,nxs])
    1599 #        phase = np.hstack([phase for cen in SSCen])
    16001599        sinp = np.sin(phase)
    16011600        cosp = np.cos(phase)
     
    16131612            MF = refDict['FF']['MF'][iBeg:iFin].T[Tindx].T   #Nref,Natm
    16141613            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 X||H,Z||H*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 X||H,Z||H*L;
     1615            Hlen = np.sqrt(np.sum(HM**2,axis=0))
     1616            eM = (HM/Hlen).T    # normalize  HP  Nref,hkl=Unit vectors || Q
    16171617
    16181618            if not SGData['SGGray']:     #correct -fixed Mx,My,Mz contribution             
     
    16261626                H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])/2.          #Nref,Ntau,Nops,Natm,Mxyz
    16271627
    1628             if not SGData['SGGray']:           
     1628            if not SGData['SGGray']:
    16291629                fams += fam0[:,nxs,:,:,:]
    16301630                fbms += fbm0[:,nxs,:,:,:]
     
    16331633            fasm = np.sum(np.sum(fams,axis=-2),axis=-2)    #Nref,Mxyz; sum ops & atoms
    16341634            fbsm = np.sum(np.sum(fbms,axis=-2),axis=-2)
    1635 #put into cartesian space
    1636             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)
    16381638#form e.F dot product
    16391639            eDotFa = np.sum(eM[:,nxs,:]*facm,axis=-1)    #Nref,Ntau       
Note: See TracChangeset for help on using the changeset viewer.