Changeset 4149
- Timestamp:
- Sep 15, 2019 8:48:55 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r4147 r4149 1603 1603 HM = np.inner(Bmat,HP.T) #put into cartesian space X||H,Z||H*L 1604 1604 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,Natm1606 1605 #for fixed moments --> m=0 reflections 1607 1606 fam0 = 0. … … 1619 1618 1620 1619 if not SGData['SGGray']: 1621 fams *= 0.51622 fbms *= 0.51620 # fams *= 0.5 1621 # fbms *= 0.5 1623 1622 fams += fam0[:,nxs,:,:,:] 1624 1623 fbms += fbm0[:,nxs,:,:,:] 1624 1625 1625 # 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) 1627 1628 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 1634 1637 #do integration 1635 1638 fas = np.sum(glWt*fass,axis=1) … … 1653 1656 1654 1657 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" 1656 1659 if 'P' not in calcControls[hfx+'histType']: 1657 1660 refl.T[8] = np.copy(refl.T[10])
Note: See TracChangeset
for help on using the changeset viewer.