Changeset 4321
- Timestamp:
- Feb 18, 2020 4:03:09 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4297 r4321 5444 5444 Names = [name for name in Names if 'Va' not in name] 5445 5445 else: 5446 XY = [[X.T,(DX*Y.T)+Ymin] for Y in Partials] 5447 if 'G(R)' in Labels[label][1]: 5446 XY = [[X.T,(DX*Y.T)] for Y in Partials] 5447 if 'G(R)' in Labels[label][1]: #only for neutrons 5448 sumAtm = 0 5449 BLtables = G2elem.GetBLtable(generalData) 5450 AtNum = generalData['NoAtoms'] 5451 for atm in AtNum: sumAtm += AtNum[atm] 5452 bfac = {} 5453 bcorr = [] 5454 for atm in AtNum: 5455 if 'SL' in BLtables[atm][1]: 5456 bfac[atm] = BLtables[atm][1]['SL'][0]*AtNum[atm]/sumAtm 5457 else: #resonant scatters (unlikely!) 5458 bfac[atm] = AtNum[atm]/sumAtm 5459 for name in Names: 5460 if '-' in name: 5461 at1,at2 = name.strip().split('-') 5462 bcorr.append(100.*bfac[at1]*bfac[at2]) #scale to pm^2 5463 if at1 == at2: 5464 bcorr[-1] /= 2. #no double counting 5465 for ixy,xy in enumerate(XY): 5466 xy[1] *= bcorr[ixy] 5467 xy[1] += Ymin 5448 5468 Xmax = np.searchsorted(Ysave[0][0],XY[0][0][-1]) 5449 5469 G2plt.PlotXY(G2frame,XY2=XY,XY=[Ysave[0][:,0:Xmax],],labelX=Labels[label][0],
Note: See TracChangeset
for help on using the changeset viewer.