Changeset 1453 for trunk/GSASIIElem.py


Ignore:
Timestamp:
Aug 1, 2014 3:19:48 PM (9 years ago)
Author:
vondreele
Message:

get HKLF data type into RefDict?
create a SetDefaultDData routine in GSASII.py
fix copyflags for sc extinction coeff
fix neutron resonant ff for TOF
fix error in making Hessian v-cov matrix - now matches the Jabobian one
put names in the Es, Ep & Eg sc extinction coeff
fix errors in SCExtinction - still problem with derivatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElem.py

    r1428 r1453  
    326326    return FP,FPP
    327327   
    328 def BlenResTOF(El,BLtables,wave):
    329     FP = np.zeros(len(wave))
    330     FPP = np.zeros(len(wave))
    331     BL = BLtables[El][1]
    332     print BL
    333     if 'BW-LS' in BL:
    334         Re,Im,E0,gam,A,E1,B,E2 = BL['BW-LS'][1:]
    335         Emev = 81.80703/wave**2
    336         T0 = Emev-E0
    337         T1 = Emev-E1
    338         T2 = Emev-E2
    339         D0 = T0**2+gam**2
    340         D1 = T1**2+gam**2
    341         D2 = T2**2+gam**2
    342         FP = Re*(T0/D0+A*T1/D1+B*T2/D2)
    343         FPP = Im*(1/D0+A/D1+B/D2)
    344     else:
    345         FPP = np.ones(len(wave))*BL['SL'][1]    #for Li, B, etc.
     328def BlenResTOF(Els,BLtables,wave):
     329    FP = np.zeros((len(Els),len(wave)))
     330    FPP = np.zeros((len(Els),len(wave)))
     331    BL = [BLtables[el][1] for el in Els]
     332    for i,El in enumerate(Els):
     333        if 'BW-LS' in BL[i]:
     334            Re,Im,E0,gam,A,E1,B,E2 = BL[i]['BW-LS'][1:]
     335            Emev = 81.80703/wave**2
     336            T0 = Emev-E0
     337            T1 = Emev-E1
     338            T2 = Emev-E2
     339            D0 = T0**2+gam**2
     340            D1 = T1**2+gam**2
     341            D2 = T2**2+gam**2
     342            FP[i] = Re*(T0/D0+A*T1/D1+B*T2/D2)
     343            FPP[i] = Im*(1/D0+A/D1+B/D2)
     344        else:
     345            FPP[i] = np.ones(len(wave))*BL[i]['SL'][1]    #for Li, B, etc.
    346346    return FP,FPP
    347347   
Note: See TracChangeset for help on using the changeset viewer.