Changeset 4149


Ignore:
Timestamp:
Sep 15, 2019 8:48:55 AM (4 years ago)
Author:
vondreele
Message:

mag. revisions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r4147 r4149  
    16031603            HM = np.inner(Bmat,HP.T)                            #put into cartesian space X||H,Z||H*L
    16041604            eM = (HM/np.sqrt(np.sum(HM**2,axis=0))).T               #& normalize    Nref,hkl
    1605             eDotK = np.sum(eM[:,nxs,nxs,nxs,:]*Kdata[nxs,:,:,:,:],axis=-1)    #Nref,Ntau,Nops,Natm
    16061605#for fixed moments --> m=0 reflections
    16071606            fam0 = 0.
     
    16191618           
    16201619            if not SGData['SGGray']:
    1621                 fams *= 0.5
    1622                 fbms *= 0.5
     1620#                fams *= 0.5
     1621#                fbms *= 0.5
    16231622                fams += fam0[:,nxs,:,:,:]
    16241623                fbms += fbm0[:,nxs,:,:,:]
     1624               
    16251625# do sum on ops, atms 1st                       
    1626             sinsq = np.sqrt(1.-eDotK**2)        #projection - Nref,Ntau,Nops,Natm
     1626            fasm = np.sum(np.sum(fams,axis=-2),axis=-2)    #Nref,Ntau,Mxyz; sum ops & atoms
     1627            fbsm = np.sum(np.sum(fbms,axis=-2),axis=-2)
    16271628           
    1628             famqs = np.sum(np.sum(fams*sinsq[:,:,:,:,nxs],axis=-2),axis=-2)      #Nref,Ntau,Mxyz; sum ops & atoms
    1629             fbmqs = np.sum(np.sum(fbms*sinsq[:,:,:,:,nxs],axis=-2),axis=-2)
    1630            
    1631             fass = np.sum(famqs**2,axis=-1)      #mag intensity calc F^2-(e.F)^2
    1632             fbss = np.sum(fbmqs**2,axis=-1)
    1633            
     1629#form e.F dot product
     1630
     1631            eDotFa = np.sum(eM[:,nxs,:]*fasm,axis=-1)    #Nref,Ntau       
     1632            eDotFb = np.sum(eM[:,nxs,:]*fbsm,axis=-1)
     1633#intensity
     1634            fass = np.sum(fasm**2,axis=-1)-eDotFa**2
     1635            fbss = np.sum(fbsm**2,axis=-1)-eDotFb**2
     1636               
    16341637#do integration           
    16351638            fas = np.sum(glWt*fass,axis=1)
     
    16531656           
    16541657            refl.T[10] = np.sum(fas,axis=0)**2+np.sum(fbs,axis=0)**2    #square of sums
    1655             refl.T[11] = atan2d(fbs[0],fas[0])  #ignore f' & f"
     1658            refl.T[11] = atan2d(fbs[0],fas[0])  #use only tau=0; ignore f' & f"
    16561659        if 'P' not in calcControls[hfx+'histType']:
    16571660            refl.T[8] = np.copy(refl.T[10])               
Note: See TracChangeset for help on using the changeset viewer.