Ignore:
Timestamp:
Jul 24, 2014 9:39:05 AM (7 years ago)
Author:
vondreele
Message:

add difB as a term in d3 for TOF - trial
a patch for old files for missing mapDataFlip? flag
in Unit cells list the Show hkl pos now updates the Index peak list; this can be useful for trying out unit cells by hand, e.g. for contaminating phases, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r1402 r1439  
    417417def Pos2dsp(Inst,pos):
    418418    ''' convert powder pattern position (2-theta or TOF, musec) to d-spacing
    419     ignores secondary effects (e.g. difA in TOF)
     419    ignores secondary effects (e.g. difA,difB in TOF)
    420420    '''
    421421    if 'C' in Inst['Type'][0]:
    422422        wave = G2mth.getWave(Inst)
    423423        dsp = wave/(2.0*sind((pos-Inst['Zero'][1])/2.0))
    424     else:   #'T'OF - ignore difA
     424    else:   #'T'OF - ignore difA, difB
    425425        dsp = (pos-Inst['Zero'][1])/Inst['difC'][1]
    426426    return dsp
     
    433433        wave = G2mth.getWave(Inst)
    434434        pos = 2.0*asind(wave/(2.*dsp))+Inst['Zero'][1]             
    435     else:   #'T'OF - ignore difA
    436         pos = Inst['difC'][1]*dsp+Inst['Zero'][1]
     435    else:   #'T'OF
     436        pos = Inst['difC'][1]*dsp+Inst['Zero'][1]+Inst['difA'][1]*dsp**2+Inst.get('difB',[0,0,False])[1]*dsp**3
    437437    return pos             
    438438   
Note: See TracChangeset for help on using the changeset viewer.