Changeset 1559 for trunk/GSASIIstrMath.py
- Timestamp:
- Nov 3, 2014 2:48:51 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMath.py
r1498 r1559 1370 1370 return sigDict,gamDict 1371 1371 1372 def GetReflPos(refl,wave, G,hfx,calcControls,parmDict):1372 def GetReflPos(refl,wave,A,hfx,calcControls,parmDict): 1373 1373 'Needs a doc string' 1374 1374 h,k,l = refl[:3] 1375 dsq = 1./G2lat.calc_rDsq2(np.array([h,k,l]),G) 1376 d = np.sqrt(dsq) 1375 d = 1./np.sqrt(G2lat.calc_rDsq(np.array([h,k,l]),A)) 1377 1376 1378 1377 refl[4] = d … … 1489 1488 return dDijDict 1490 1489 1490 def GetDij(phfx,SGData,parmDict): 1491 HSvals = [parmDict[phfx+name] for name in G2spc.HStrainNames(SGData)] 1492 return G2spc.HStrainVals(HSvals,SGData) 1493 1491 1494 def GetFobsSq(Histograms,Phases,parmDict,calcControls): 1492 1495 'Needs a doc string' … … 1596 1599 bet = parmDict[hfx+'beta-0']+parmDict[hfx+'beta-1']/refl[4]**4+parmDict[hfx+'beta-q']/refl[4]**2 1597 1600 return alp,bet 1598 1601 1599 1602 hId = Histogram['hId'] 1600 1603 hfx = ':%d:'%(hId) … … 1624 1627 SGData = Phase['General']['SGData'] 1625 1628 SGMT = np.array([ops[0].T for ops in SGData['SGOps']]) 1626 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #Do I want to modify by Dij?1629 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #+GetDij(phfx,SGData,parmDict) 1627 1630 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 1628 1631 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies … … 1638 1641 h,k,l = refl[:3] 1639 1642 Uniq = np.inner(refl[:3],SGMT) 1640 refl[5] = GetReflPos(refl,wave, G,hfx,calcControls,parmDict) #corrected reflection position1643 refl[5] = GetReflPos(refl,wave,A,hfx,calcControls,parmDict) #corrected reflection position 1641 1644 Lorenz = 1./(2.*sind(refl[5]/2.)**2*cosd(refl[5]/2.)) #Lorentz correction 1642 1645 refl[5] += GetHStrainShift(refl,SGData,phfx,hfx,calcControls,parmDict) #apply hydrostatic strain shift … … 1678 1681 h,k,l = refl[:3] 1679 1682 Uniq = np.inner(refl[:3],SGMT) 1680 refl[5] = GetReflPos(refl,0.0, G,hfx,calcControls,parmDict) #corrected reflection position1683 refl[5] = GetReflPos(refl,0.0,A,hfx,calcControls,parmDict) #corrected reflection position 1681 1684 Lorenz = sind(parmDict[hfx+'2-theta']/2)*refl[4]**4 #TOF Lorentz correction 1682 1685 refl[5] += GetHStrainShift(refl,SGData,phfx,hfx,calcControls,parmDict) #apply hydrostatic strain shift … … 1783 1786 pfx = '%d::'%(pId) 1784 1787 phfx = '%d:%d:'%(pId,hId) 1785 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #And modify here by Dij? - no1788 A = [parmDict[pfx+'A%d'%(i)] for i in range(6)] #+GetDij(phfx,SGData,parmDict) 1786 1789 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 1787 1790 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matricies
Note: See TracChangeset
for help on using the changeset viewer.