Ignore:
Timestamp:
Nov 25, 2014 2:42:11 PM (7 years ago)
Author:
vondreele
Message:

remove Pwr from FitPeaksZ, SSZ & T - wasn't used
put in derivatives for FitPeaksZ, etc. - works better
reorder arrows & make the expand/shrink symmetric about view point
remove zero & refine? from SS Unit Cells display - not refinable with modulation coeff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r1581 r1585  
    424424        return wave/(2.0*sind((pos-Inst.get('Zero',[0,0])[1])/2.0))
    425425    else:   #'T'OF - ignore difB
     426#        return TOF2dsp(Inst,pos)
    426427        T = pos-Inst['Zero'][1]
    427428        T1 = Inst['difC'][1]**2-4.*Inst['difA'][1]*T
    428429        return 2.*T/(Inst['difC'][1]+np.sqrt(T1))
     430       
     431def TOF2dsp(Inst,Pos):
     432    import scipy.optimize as so
     433   
     434    def func(d,pos,Inst):
     435        return pos-Inst['difC'][1]*d-Inst['difA'][1]*d**2-Inst['Zero'][1]-Inst['difB'][1]/d
     436       
     437    return [so.brentq(func,.01,100.,args=(pos,Inst)) for pos in Pos]
    429438   
    430439def Dsp2pos(Inst,dsp):
Note: See TracChangeset for help on using the changeset viewer.