Ignore:
Timestamp:
Jul 28, 2014 4:53:56 PM (7 years ago)
Author:
vondreele
Message:

add calibration of lam, difC, etc. from index peak positions
new plotCalib routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r1439 r1443  
    428428def Dsp2pos(Inst,dsp):
    429429    ''' convert d-spacing to powder pattern position (2-theta or TOF, musec)
    430     ignores secondary effects (e.g. difA in TOF) - maybe later?
    431430    '''
    432431    if 'C' in Inst['Type'][0]:
     
    435434    else:   #'T'OF
    436435        pos = Inst['difC'][1]*dsp+Inst['Zero'][1]+Inst['difA'][1]*dsp**2+Inst.get('difB',[0,0,False])[1]*dsp**3
    437     return pos             
     436    return pos
     437   
     438def getPeakPos(dataType,parmdict,dsp):
     439    ''' convert d-spacing to powder pattern position (2-theta or TOF, musec)
     440    '''
     441    if 'C' in dataType:
     442        pos = 2.0*asind(parmdict['Lam']/(2.*dsp))+parmdict['Zero']
     443    else:   #'T'OF
     444        pos = parmdict['difC']*dsp+parmdict['difA']*dsp**2+parmdict['difB']*dsp**3+parmdict['Zero']
     445    return pos
     446                   
    438447   
    439448def calc_rDsq(H,A):
Note: See TracChangeset for help on using the changeset viewer.