Changeset 1464


Ignore:
Timestamp:
Aug 17, 2014 4:05:35 PM (7 years ago)
Author:
vondreele
Message:

change sig-q & beta-q functionality to be 1/d2 - seems to work better

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1462 r1464  
    20492049   
    20502050    '''
    2051     return ins['sig-0']+ins['sig-1']*dsp**2+ins['sig-2']*dsp**4+ins['sig-q']*dsp
     2051    return ins['sig-0']+ins['sig-1']*dsp**2+ins['sig-2']*dsp**4+ins['sig-q']/dsp**2
    20522052   
    20532053def getTOFsigDeriv(dsp):
     
    20592059   
    20602060    '''
    2061     return 1.0,dsp**2,dsp**4,dsp
     2061    return 1.0,dsp**2,dsp**4,1./dsp**2
    20622062   
    20632063def getTOFgamma(ins,dsp):
     
    20932093   
    20942094    '''
    2095     return ins['beta-0']+ins['beta-1']/dsp**4+ins['beta-q']/dsp
     2095    return ins['beta-0']+ins['beta-1']/dsp**4+ins['beta-q']/dsp**2
    20962096   
    20972097def getTOFbetaDeriv(dsp):
     
    21032103   
    21042104    '''
    2105     return 1.0,1./dsp**4,1./dsp
     2105    return 1.0,1./dsp**4,1./dsp**2
    21062106   
    21072107def getTOFalpha(ins,dsp):
  • trunk/GSASIIpwd.py

    r1462 r1464  
    480480    'needs a doc string'
    481481    sig = lambda Th,U,V,W: 1.17741*math.sqrt(max(0.001,U*tand(Th)**2+V*tand(Th)+W))*math.pi/180.
    482     sigTOF = lambda dsp,S0,S1,S2,Sq:  S0+S1*dsp**2+S2*dsp**4+Sq*dsp
     482    sigTOF = lambda dsp,S0,S1,S2,Sq:  S0+S1*dsp**2+S2*dsp**4+Sq/dsp**2
    483483    gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))*math.pi/180.
    484484    gamTOF = lambda dsp,X,Y: X*dsp+Y*dsp**2
  • trunk/GSASIIstrMath.py

    r1462 r1464  
    16121612    def GetReflSigGamTOF(refl,G,GB,phfx,calcControls,parmDict):
    16131613        sig = parmDict[hfx+'sig-0']+parmDict[hfx+'sig-1']*refl[4]**2+   \
    1614             parmDict[hfx+'sig-2']*refl[4]**4+parmDict[hfx+'sig-q']*refl[4]
     1614            parmDict[hfx+'sig-2']*refl[4]**4+parmDict[hfx+'sig-q']/refl[4]**2
    16151615        gam = parmDict[hfx+'X']*refl[4]+parmDict[hfx+'Y']*refl[4]**2
    16161616        Ssig,Sgam = GetSampleSigGam(refl,0.0,G,GB,hfx,phfx,calcControls,parmDict)
     
    16231623    def GetReflAlpBet(refl,hfx,parmDict):
    16241624        alp = parmDict[hfx+'alpha']/refl[4]
    1625         bet = parmDict[hfx+'beta-0']+parmDict[hfx+'beta-1']/refl[4]**4+parmDict[hfx+'beta-q']/refl[4]
     1625        bet = parmDict[hfx+'beta-0']+parmDict[hfx+'beta-1']/refl[4]**4+parmDict[hfx+'beta-q']/refl[4]**2
    16261626        return alp,bet
    16271627               
     
    18831883                    hfx+'Zero':[dpdZ,'pos'],hfx+'X':[refl[4],'gam'],hfx+'Y':[refl[4]**2,'gam'],
    18841884                    hfx+'alpha':[1./refl[4],'alp'],hfx+'beta-0':[1.0,'bet'],hfx+'beta-1':[1./refl[4]**4,'bet'],
    1885                     hfx+'beta-q':[1./refl[4],'bet'],hfx+'sig-0':[1.0,'sig'],hfx+'sig-1':[refl[4]**2,'sig'],
    1886                     hfx+'sig-2':[refl[4]**4,'sig'],hfx+'sig-q':[refl[4],'sig'],
     1885                    hfx+'beta-q':[1./refl[4]**2,'bet'],hfx+'sig-0':[1.0,'sig'],hfx+'sig-1':[refl[4]**2,'sig'],
     1886                    hfx+'sig-2':[refl[4]**4,'sig'],hfx+'sig-q':[1./refl[4]**2,'sig'],
    18871887                    hfx+'Absorption':[dFdAb,'int'],hfx+'Extinction':[dFdEx,'int'],}
    18881888            for name in names:
Note: See TracChangeset for help on using the changeset viewer.