Changeset 1009 for trunk/GSASIIpwd.py
 Timestamp:
 Jul 24, 2013 4:39:06 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIpwd.py
r998 r1009 439 439 return widths,fmin,fmax 440 440 441 def getFWHM( TTh,Inst):441 def getFWHM(pos,Inst): 442 442 'needs a doc string' 443 443 sig = lambda Th,U,V,W: 1.17741*math.sqrt(max(0.001,U*tand(Th)**2+V*tand(Th)+W))*math.pi/180. 444 sigTOF = lambda dsp,S0,S1,Sq: S0+S1*dsp**2+Sq*dsp 444 445 gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))*math.pi/180. 445 s = sig(TTh/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1])*100. 446 g = gam(TTh/2.,Inst['X'][1],Inst['Y'][1])*100. 446 gamTOF = lambda dsp,X,Y: X*dsp+Y*dsp**2 447 if 'C' in Inst['Type'][0]: 448 s = sig(pos/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1])*100. 449 g = gam(pos/2.,Inst['X'][1],Inst['Y'][1])*100. 450 else: 451 dsp = pos/Inst['difC'][0] 452 s = sigTOF(dsp,Inst['sig0'][1],Inst['sig1'][1],Inst['sigq'][1]) 453 g = gamTOF(dsp,Inst['X'][1],Inst['Y'][1]) 447 454 return getgamFW(g,s) 448 455
Note: See TracChangeset
for help on using the changeset viewer.