Skip to content

Commit f20c5c8

Browse files
committed
fix bugs in HKLSort & HKLMerge
1 parent 830d572 commit f20c5c8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

GSASII/GSASIIdataGUI.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def OnSmart(event):
223223
if self.Type == 'SEC':
224224
Smart = wx.CheckBox(self.panel,label=' Do smart merge for microED?')
225225
Smart.Bind(wx.EVT_CHECKBOX,OnSmart)
226-
mainSizer.Add(Smart,0)
226+
mainSizer.Add(Smart,0)
227227

228228
OkBtn = wx.Button(self.panel,-1,"Ok")
229229
OkBtn.Bind(wx.EVT_BUTTON, self.OnOk)
@@ -8369,9 +8369,7 @@ def OnMergeHKL(event):
83698369
Comments = []
83708370
refList = np.copy(data[1]['RefList'])
83718371
Comments.append(' Merging %d reflections from %s'%(len(refList),Name))
8372-
if 'Type' not in data[0]:
8373-
G2frame.ErrorDialog('Unknown data type','Define data type in Instrument Parameters first')
8374-
return
8372+
data[0]['Type'] = Inst[0]['Type'][1][:]
83758373
dlg = MergeDialog(G2frame,data)
83768374
try:
83778375
if dlg.ShowModal() == wx.ID_OK:
@@ -8403,6 +8401,8 @@ def OnMergeHKL(event):
84038401
if hkl[3+Super] == 0:
84048402
sumExt += hkl[5+Super]
84058403
Next += 1
8404+
if not hkl[5+Super]: #skip Fo == 0
8405+
continue
84068406
if str(hkl[:3+Super]) not in HKLdict:
84078407
HKLdict[str(hkl[:3+Super])] = [hkl[:3+Super],[hkl[3+Super:lenhkl],]]
84088408
else:
@@ -8510,9 +8510,7 @@ def OnSortHKL(event):
85108510
Comments = []
85118511
refList = np.copy(data[1]['RefList'])
85128512
Comments.append(' Sorting %d reflections from %s'%(len(refList),Name))
8513-
if 'Type' not in data[0]:
8514-
G2frame.ErrorDialog('Unknown data type','Define data type in Instrument Parameters first')
8515-
return
8513+
data[0]['Type'] = Inst[0]['Type'][1][:]
85168514
dlg = HKLSortDialog(G2frame,data)
85178515
try:
85188516
if dlg.ShowModal() == wx.ID_OK:

0 commit comments

Comments
 (0)