Changeset 3778 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Jan 10, 2019 2:10:58 PM (3 years ago)
Author:
vondreele
Message:

correct calculation of FWHM for TOF data & fix the alp values in the exported peaks table
a fix for incommensurate mag str fctr calcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r3774 r3778  
    653653   
    654654def getFWHM(pos,Inst):
    655     '''Compute total FWHM from Thompson, Cox & Hastings (1987), J. Appl. Cryst. 20, 79-83
     655    '''Compute total FWHM from Thompson, Cox & Hastings (1987) , J. Appl. Cryst. 20, 79-83
    656656    via getgamFW(g,s).
    657657   
     
    666666    gam = lambda Th,X,Y,Z: Z+X/cosd(Th)+Y*tand(Th)
    667667    gamTOF = lambda dsp,X,Y,Z: Z+X*dsp+Y*dsp**2
     668    alpTOF = lambda dsp,alp: alp/dsp
     669    betTOF = lambda dsp,bet0,bet1,betq: bet0+bet1/dsp**4+betq/dsp**2
    668670    if 'C' in Inst['Type'][0]:
    669671        s = sig(pos/2.,Inst['U'][1],Inst['V'][1],Inst['W'][1])
     
    672674    else:
    673675        dsp = pos/Inst['difC'][0]
     676        alp = alpTOF(dsp,Inst['alpha'][0])
     677        bet = betTOF(dsp,Inst['beta-0'][0],Inst['beta-1'][0],Inst['beta-q'][0])
    674678        s = sigTOF(dsp,Inst['sig-0'][1],Inst['sig-1'][1],Inst['sig-2'][1],Inst['sig-q'][1])
    675679        g = gamTOF(dsp,Inst['X'][1],Inst['Y'][1],Inst['Z'][1])
    676         return getgamFW(g,s)
     680        return getgamFW(g,s)+np.log(2.0)*(alp+bet)/(alp*bet)
    677681   
    678682def getgamFW(g,s):
Note: See TracChangeset for help on using the changeset viewer.