Changeset 1453 for trunk/GSASIIElem.py
 Timestamp:
 Aug 1, 2014 3:19:48 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIElem.py
r1428 r1453 326 326 return FP,FPP 327 327 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 BL333 if 'BWLS' in BL:334 Re,Im,E0,gam,A,E1,B,E2 = BL['BWLS'][1:]335 Emev = 81.80703/wave**2336 T0 = EmevE0337 T1 = EmevE1338 T2 = EmevE2339 D0 = T0**2+gam**2340 D1 = T1**2+gam**2341 D2 = T2**2+gam**2342 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.328 def 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 'BWLS' in BL[i]: 334 Re,Im,E0,gam,A,E1,B,E2 = BL[i]['BWLS'][1:] 335 Emev = 81.80703/wave**2 336 T0 = EmevE0 337 T1 = EmevE1 338 T2 = EmevE2 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. 346 346 return FP,FPP 347 347
Note: See TracChangeset
for help on using the changeset viewer.