Skip to content

Commit d00ea3b

Browse files
committed
new absorption correction plot in Absorbchange 2 entries in atmdata/OrbFF
1 parent 6c26ef3 commit d00ea3b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

GSASII/Absorb.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from . import GSASIIElem as G2elem
1818
from . import GSASIIElemGUI as G2elemGUI
1919
from . import GSASIIctrlGUI as G2G
20+
from . import GSASIIpwd as G2pwd
2021

2122
try:
2223
wx.NewIdRef
@@ -87,6 +88,7 @@ class Absorb(wx.Frame):
8788
Zcell = 1
8889
Pack = 0.50
8990
Radius = 0.4
91+
muT = 0.0
9092
def _init_coll_ABOUT_Items(self, parent):
9193

9294
parent.Append(wxID_ABSORBABOUT,'About')
@@ -460,6 +462,7 @@ def SetWaveEnergy(self,Wave):
460462
'Element: '+str(Els),"N = ",Elem[2]," f'=",(r1[0]+r2[0])/2.0,
461463
' f"=',(r1[1]+r2[1])/2.0,' '+Gkmu+'=',mu,'barns')
462464
muT += mu
465+
self.muT = muT
463466

464467
if self.Volume:
465468
Text += "%s %s%10.4g %s" % ("Total",' '+Gkmu+' =',self.Pack*muT/self.Volume,'cm'+Pwrm1+', ')
@@ -587,13 +590,21 @@ def UpDateAbsPlot(self,Wave,rePlot=True):
587590
self.Page.canvas.mpl_connect('motion_notify_event', self.OnMotion)
588591
self.Page.canvas.mpl_connect('key_press_event', self.OnKeyPress)
589592
newPlot = True
590-
self.ax = self.Page.figure.add_subplot(111,label='absorb')
593+
GS_kw = {'width_ratios':[1,1],}
594+
self.ax,self.bx = self.Page.figure.subplots(1,2,gridspec_kw=GS_kw)
591595
self.fplot.set_visible(False)
592596
self.Page.Choice = (' key press','g: toggle grid',)
593597
self.Page.keyPress = self.OnKeyPress
594598
self.ax.clear()
599+
self.bx.clear()
595600
self.ax.set_title('X-Ray Absorption',x=0,ha='left')
596601
self.ax.set_ylabel(r"$\mu R$",fontsize=14)
602+
self.bx.set_title(r"Cylinder abs. corr. for $\lambda= %.4f\AA$"%self.Wave,x=0,ha='left')
603+
self.bx.set_xlabel(r"$2\theta$",fontsize=14)
604+
Tth = np.arange(0.,140.0,0.1)
605+
pmut = self.Radius*self.Pack*self.muT/(10.0*self.Volume)
606+
Xabs = 1./G2pwd.Absorb('Cylinder',pmut,Tth)
607+
self.bx.plot(Tth,Xabs)
597608
Ymin = 0.0
598609
Ymax = 0.0
599610
if self.FPPS:

GSASII/atmdata.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@
274274
'<j1> 2s,2p':{'fa':[0.32761 ,0.05313 ,0.11289 ,-0.49850],'fb':[111.68564 ,10477.89929 ,669.03654 ,13.06583],'fc':0.00479,'Ne':1}}, #Rw: 0.961
275275
'C':{'Sl core':{'fa':[0.88920 ,1.10840 ,0.00000 ,0.00000],'fb':[1.22645 ,0.29346 ,0.00000 ,0.00000],'fc':0.00000,'Ne':1}, #Rw: 0.132
276276
'Sl 2s':{'fa':[1.32138 ,-0.94791 ,0.60974 ,0.00000],'fb':[8.22747 ,6.27454 ,28.01030 ,0.00000],'fc':0.01566,'Ne':2}, #Rw: 0.832
277-
'Sl 2p':{'fa':[-0.00821 ,0.50456 ,0.50212 ,0.00000],'fb':[0.83360 ,13.26140 ,40.01779 ,0.00000],'fc':0.00000,'Ne':2}, #Rw: 0.255
278-
'He core':{'fa':[0.88409 ,1.11512 ,0.00000 ,0.00000],'fb':[1.22350 ,0.29361 ,0.00000 ,0.00000],'fc':0.00000,'Ne':1}, #Rw: 0.072
277+
'Sl 2p':{'fa':[0.27875 ,0.53799 ,0.19586 ,-0.01243],'fb':[10.27847 ,24.77761 ,57.86792 ,1.25173],'fc':-0.00027,'Ne':2}, #Rw: 0.020 'He core':{'fa':[0.88409 ,1.11512 ,0.00000 ,0.00000],'fb':[1.22350 ,0.29361 ,0.00000 ,0.00000],'fc':0.00000,'Ne':1}, #Rw: 0.072
279278
'<j0> 2s':{'fa':[0.74236 ,-0.47982 ,0.39412 ,0.33499],'fb':[14.55721 ,1.52572 ,1.28134 ,34.89579],'fc':0.00815,'Ne':2}, #Rw: 0.048
280279
'<j0> 2p':{'fa':[-0.00542 ,0.53117 ,0.47306 ,0.00000],'fb':[0.58201 ,13.99332 ,43.31547 ,0.00000],'fc':0.00000,'Ne':2}, #Rw: 0.196
281280
'<j2> 2p':{'fa':[0.06976 ,0.21511 ,-0.22790 ,-0.05803],'fb':[1.67556 ,5.56560 ,35.84610 ,79.49824],'fc':0.00104,'Ne':1}, #Rw: 0.096
@@ -290,7 +289,7 @@
290289
'<j1> 2s,2p':{'fa':[-0.48583 ,0.32128 ,0.11040 ,0.04521],'fb':[5.48551 ,52.12781 ,349.24771 ,6847.87203],'fc':0.00832,'Ne':1}}, #Rw: 0.724
291290
'O':{'Sl core':{'fa':[0.68692 ,1.31215 ,0.00000 ,0.00000],'fb':[0.78075 ,0.19151 ,0.00000 ,0.00000],'fc':0.00000,'Ne':1}, #Rw: 0.040
292291
'Sl 2s':{'fa':[0.67997 ,-0.17420 ,0.47272 ,0.00000],'fb':[6.17545 ,2.00431 ,16.10236 ,0.00000],'fc':0.02075,'Ne':2}, #Rw: 0.221
293-
'Sl 2p':{'fa':[-0.00632 ,0.50781 ,0.49626 ,0.00000],'fb':[0.27883 ,6.41456 ,21.48168 ,0.00000],'fc':0.00000,'Ne':4}, #Rw: 0.358
292+
'Sl 2p':{'fa':[0.29692 ,0.19243 ,0.52071 ,-0.01127],'fb':[5.00547 ,32.64197 ,12.88336 ,0.39407],'fc':0.00105,'Ne':4}, #Rw: 0.000
294293
'He core':{'fa':[0.70952 ,1.29027 ,0.00000 ,0.00000],'fb':[0.75508 ,0.18794 ,0.00000 ,0.00000],'fc':0.00000,'Ne':1}, #Rw: 0.019
295294
'<j0> 2s':{'fa':[0.72731 ,-0.14156 ,0.39516 ,0.00000],'fb':[6.79666 ,1.80663 ,17.32356 ,0.00000],'fc':0.01877,'Ne':2}, #Rw: 0.090
296295
'<j0> 2p':{'fa':[-0.00408 ,0.55404 ,0.44868 ,0.00000],'fb':[0.12557 ,6.88485 ,23.35385 ,0.00000],'fc':0.00000,'Ne':4}, #Rw: 0.222

0 commit comments

Comments
 (0)