Changeset 2129 for trunk/GSASIIpwd.py
- Timestamp:
- Jan 21, 2016 10:25:48 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIpwd.py ¶
r2049 r2129 457 457 def getWidthsCW(pos,sig,gam,shl): 458 458 '''Compute the peak widths used for computing the range of a peak 459 for constant wavelength data. 460 On low-angle side, 10 FWHM are used, on high-angle side 15 are used459 for constant wavelength data. On low-angle side, 10 FWHM are used, 460 on high-angle side 15 are used, low angle side extended by axial divergence 461 461 (for peaks above 90 deg, these are reversed.) 462 462 ''' 463 widths = [np.sqrt(sig)/100.,gam/ 200.]464 fwhm = 2.355*widths[0]+ 2.*widths[1]463 widths = [np.sqrt(sig)/100.,gam/100.] 464 fwhm = 2.355*widths[0]+widths[1] 465 465 fmin = 10.*(fwhm+shl*abs(npcosd(pos))) 466 466 fmax = 15.0*fwhm … … 470 470 471 471 def getWidthsTOF(pos,alp,bet,sig,gam): 472 'needs a doc string' 472 '''Compute the peak widths used for computing the range of a peak 473 for constant wavelength data. 10 FWHM are used on both sides each 474 extended by exponential coeff. 475 ''' 473 476 lnf = 3.3 # =log(0.001/2) 474 477 widths = [np.sqrt(sig),gam] … … 494 497 495 498 def getgamFW(g,s): 496 'needs a doc string' 499 '''Compute total FWHM from Thompson, Cox & Hastings (1987), J. Appl. Cryst. 20, 79-83 500 501 :param g: float Lorentzian FWHM 502 :param s: float Gaussian FWHM 503 504 :returns float: total FWHM of pseudoVoigt 505 ''' 497 506 gamFW = lambda s,g: np.exp(np.log(s**5+2.69269*s**4*g+2.42843*s**3*g**2+4.47163*s**2*g**3+0.07842*s*g**4+g**5)/5.) 498 return gamFW( g,s)507 return gamFW(s,g) 499 508 500 509 def getFCJVoigt(pos,intens,sig,gam,shl,xdata): … … 901 910 else: 902 911 sig = G2mth.getCWsig(parmDict,tth) 903 sig = max(sig,0.001) #avoid neg sigma 912 sig = max(sig,0.001) #avoid neg sigma^2 904 913 gamName = 'gam'+str(iPeak) 905 914 if gamName in varyList:
Note: See TracChangeset
for help on using the changeset viewer.