Skip to content

Commit 41b8c58

Browse files
committed
Add a Fo only option to HKL plot
Fix bug in CheckAddHKLF
1 parent c9d9c84 commit 41b8c58

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

GSASII/GSASIIphsGUI.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13504,7 +13504,7 @@ def CheckAddHKLF(G2frame,data):
1350413504
for i in result:
1350513505
histoName = TextList[i]
1350613506
Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,histoName)
13507-
refDict,reflData = G2frame.GPXtree.GetItemPyData(Id)
13507+
refDict,reflData = G2frame.GPXtree.GetItemPyData(Id)[:2]
1350813508
G2mth.UpdateHKLFvals(histoName, data, reflData)
1350913509

1351013510
wx.EndBusyCursor()

GSASII/GSASIIplot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def OnSCKeyPress(event):
956956
i = zones.index(Data['Zone'])
957957
newPlot = False
958958
pwdrChoice = {'f':'Fo','s':'Fosq','u':'Unit Fc'}
959-
hklfChoice = {'1':'|DFsq|>sig','3':'|DFsq|>3sig','w':'|DFsq|/sig','f':'Fo','s':'Fosq','i':'Unit Fc'}
959+
hklfChoice = {'1':'|DFsq|>sig','3':'|DFsq|>3sig','w':'|DFsq|/sig','f':'Fo','s':'Fosq','u':'Unit Fc','o':'Fo only'}
960960
if event.key == 'h':
961961
Data['Zone'] = '100'
962962
newPlot = True
@@ -1044,7 +1044,7 @@ def OnPick(event):
10441044
'f: select Fo','s: select Fosq','u: select unit Fc',
10451045
'+: increase index','-: decrease index','0: zero layer',)
10461046
if 'HKLF' in Name:
1047-
Page.Choice += ('w: select |DFsq|/sig','1: select |DFsq|>sig','3: select |DFsq|>3sig',)
1047+
Page.Choice += ('o: select Fo only','w: select |DFsq|/sig','1: select |DFsq|>sig','3: select |DFsq|>3sig',)
10481048
try:
10491049
Plot.set_aspect(aspect='equal')
10501050
except: #broken in mpl 3.1.1; worked in mpl 3.0.3
@@ -1096,6 +1096,9 @@ def OnPick(event):
10961096
B = scale*math.sqrt(max(0,Fcsq))/FoMax
10971097
C = abs(A-B)
10981098
sumDF += C
1099+
elif Type == 'Fo only':
1100+
A = scale*Fosq/FosqMax
1101+
sumFo += A
10991102
elif Type == 'Unit Fc':
11001103
A = scale/2
11011104
B = scale/2

0 commit comments

Comments
 (0)