Changeset 1415


Ignore:
Timestamp:
Jul 7, 2014 9:44:25 AM (7 years ago)
Author:
vondreele
Message:

fixed errors in G2strIO: missing exclude of 'Source' for Iparm I/O
document single peak stuff in G2math

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1363 r1415  
    19961996
    19971997def getCWsig(ins,pos):
    1998     '''default doc string
    1999    
    2000     :param type name: description
    2001    
    2002     :returns: type name: description
     1998    '''get CW peak profile sigma
     1999   
     2000    :param dict ins: instrument parameters with at least 'U', 'V', & 'W'
     2001    as values only
     2002    :param float pos: 2-theta of peak
     2003    :returns: float getCWsig: peak sigma
    20032004   
    20042005    '''
     
    20072008   
    20082009def getCWsigDeriv(pos):
    2009     '''default doc string
    2010    
    2011     :param type name: description
    2012    
    2013     :returns: type name: description
     2010    '''get derivatives of CW peak profile sigma wrt U,V, & W
     2011   
     2012    :param float pos: 2-theta of peak
     2013   
     2014    :returns: list getCWsigDeriv: d(sig)/dU, d(sig)/dV & d(sig)/dW
    20142015   
    20152016    '''
     
    20182019   
    20192020def getCWgam(ins,pos):
    2020     '''default doc string
    2021    
    2022     :param type name: description
    2023    
    2024     :returns: type name: description
     2021    '''get CW peak profile gamma
     2022   
     2023    :param dict ins: instrument parameters with at least 'X' & 'Y'
     2024    as values only
     2025    :param float pos: 2-theta of peak
     2026    :returns: float getCWgam: peak gamma
    20252027   
    20262028    '''
     
    20282030   
    20292031def getCWgamDeriv(pos):
    2030     '''default doc string
    2031    
    2032     :param type name: description
    2033    
    2034     :returns: type name: description
     2032    '''get derivatives of CW peak profile gamma wrt X & Y
     2033   
     2034    :param float pos: 2-theta of peak
     2035   
     2036    :returns: list getCWgamDeriv: d(gam)/dX & d(gam)/dY
    20352037   
    20362038    '''
     
    20382040   
    20392041def getTOFsig(ins,dsp):
    2040     '''default doc string
    2041    
    2042     :param type name: description
    2043    
    2044     :returns: type name: description
     2042    '''get TOF peak profile sigma
     2043   
     2044    :param dict ins: instrument parameters with at least 'sig-0', 'sig-1' & 'sig-q'
     2045    as values only
     2046    :param float dsp: d-spacing of peak
     2047   
     2048    :returns: float getTOFsig: peak sigma
    20452049   
    20462050    '''
     
    20482052   
    20492053def getTOFsigDeriv(dsp):
    2050     '''default doc string
    2051    
    2052     :param type name: description
    2053    
    2054     :returns: type name: description
     2054    '''get derivatives of TOF peak profile gamma wrt sig-0, sig-1, & sig-q
     2055   
     2056    :param float dsp: d-spacing of peak
     2057   
     2058    :returns: list getTOFsigDeriv: d(sig0/d(sig-0), d(sig)/d(sig-1) & d(sig)/d(sig-q)
    20552059   
    20562060    '''
     
    20582062   
    20592063def getTOFgamma(ins,dsp):
    2060     '''default doc string
    2061    
    2062     :param type name: description
    2063    
    2064     :returns: type name: description
     2064    '''get TOF peak profile gamma
     2065   
     2066    :param dict ins: instrument parameters with at least 'X' & 'Y'
     2067    as values only
     2068    :param float dsp: d-spacing of peak
     2069   
     2070    :returns: float getTOFgamma: peak gamma
    20652071   
    20662072    '''
     
    20682074   
    20692075def getTOFgammaDeriv(dsp):
    2070     '''default doc string
    2071    
    2072     :param type name: description
    2073    
    2074     :returns: type name: description
     2076    '''get derivatives of TOF peak profile gamma wrt X & Y
     2077   
     2078    :param float dsp: d-spacing of peak
     2079   
     2080    :returns: list getTOFgammaDeriv: d(gam)/dX & d(gam)/dY
    20752081   
    20762082    '''
     
    20782084   
    20792085def getTOFbeta(ins,dsp):
    2080     '''default doc string
    2081    
    2082     :param type name: description
    2083    
    2084     :returns: type name: description
     2086    '''get TOF peak profile beta
     2087   
     2088    :param dict ins: instrument parameters with at least 'beat-0', 'beta-1' & 'beta-q'
     2089    as values only
     2090    :param float dsp: d-spacing of peak
     2091   
     2092    :returns: float getTOFbeta: peak beat
    20852093   
    20862094    '''
     
    20882096   
    20892097def getTOFbetaDeriv(dsp):
    2090     '''default doc string
    2091    
    2092     :param type name: description
    2093    
    2094     :returns: type name: description
     2098    '''get derivatives of TOF peak profile beta wrt beta-0, beta-1, & beat-q
     2099   
     2100    :param float dsp: d-spacing of peak
     2101   
     2102    :returns: list getTOFbetaDeriv: d(beta)/d(beat-0), d(beta)/d(beta-1) & d(beta)/d(beta-q)
    20952103   
    20962104    '''
     
    20982106   
    20992107def getTOFalpha(ins,dsp):
    2100     '''default doc string
    2101    
    2102     :param type name: description
    2103    
    2104     :returns: type name: description
     2108    '''get TOF peak profile alpha
     2109   
     2110    :param dict ins: instrument parameters with at least 'alpha'
     2111    as values only
     2112    :param float dsp: d-spacing of peak
     2113   
     2114    :returns: flaot getTOFalpha: peak alpha
    21052115   
    21062116    '''
     
    21082118   
    21092119def getTOFalphaDeriv(dsp):
    2110     '''default doc string
    2111    
    2112     :param type name: description
    2113    
    2114     :returns: type name: description
     2120    '''get derivatives of TOF peak profile beta wrt alpha
     2121   
     2122    :param float dsp: d-spacing of peak
     2123   
     2124    :returns: float getTOFalphaDeriv: d(alp)/d(alpha)
    21152125   
    21162126    '''
     
    21182128   
    21192129def setPeakparms(Parms,Parms2,pos,mag,ifQ=False,useFit=False):
    2120     '''default doc string
    2121    
    2122     :param type name: description
    2123    
    2124     :returns: type name: description
     2130    '''set starting peak parameters for single peak fits from plot selection or auto selection
     2131   
     2132    :param dict Parms: instrument parameters dictionary
     2133    :param dict Parms2: table lookup for TOF profile coefficients
     2134    :param float pos: peak position in 2-theta, TOF or Q (ifQ=True)
     2135    :param float mag: peak top magnitude from pick
     2136    :param bool ifQ: True if pos in Q
     2137    :param bool useFit: True if use fitted CW Parms values (not defaults)
     2138   
     2139    :returns: list XY: peak list entry:
     2140        for CW: [pos,0,mag,1,sig,0,gam,0]
     2141        for TOF: [pos,0,mag,1,alp,0,bet,0,sig,0,gam,0]
     2142        NB: mag refinement set by default, all others off
    21252143   
    21262144    '''
  • trunk/GSASIIpwd.py

    r1412 r1415  
    12351235                        parmDict[sigName] = G2mth.getCWsig(parmDict,pos)
    12361236                    else:
    1237                         dsp = pos/Inst['difC'][1]
     1237                        dsp = G2mth.Pos2dsp(Inst,pos)
    12381238                        parmDict[sigName] = G2mth.getTOFsig(parmDict,dsp)
    12391239                gamName = 'gam'+str(iPeak)
     
    12421242                        parmDict[gamName] = G2mth.getCWgam(parmDict,pos)
    12431243                    else:
    1244                         dsp = pos/Inst['difC'][1]
     1244                        dsp = G2mth.Pos2dsp(Inst,pos)
    12451245                        parmDict[gamName] = G2mth.getTOFgamma(parmDict,dsp)
    12461246                iPeak += 1
  • trunk/GSASIIstrIO.py

    r1409 r1415  
    22872287        insKeys.sort()
    22882288        for item in insKeys:
    2289             if item != 'Type':
     2289            if item not in ['Type','Source']:
    22902290                ptlbls += '%12s' % (item)
    22912291                ptstr += '%12.6f' % (Inst[item][1])
     
    25052505        insKeys.sort()
    25062506        for name in insKeys:
    2507             if name not in  ['Type','Lam1','Lam2','Azimuth']:
     2507            if name not in  ['Type','Lam1','Lam2','Azimuth','Source']:
    25082508                ptlbls += '%12s' % (name)
    25092509                ptstr += '%12.6f' % (Inst[name][1])
Note: See TracChangeset for help on using the changeset viewer.