Skip to content

Commit 172608b

Browse files
committed
Merge remote-tracking branch 'origin/main' into logging
2 parents fc9b05c + 5c908bf commit 172608b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

GSASII/GSASIImath.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4305,7 +4305,9 @@ def ChargeFlip(data,reflDict,pgbar):
43054305
SQ = 0.25/dsp**2
43064306
ff *= G2el.ScatFac(FFtable,SQ)[0]
43074307
if ref[8+im] > 0.: #use only +ve Fobs**2
4308-
E = np.sqrt(ref[8+im])/ff
4308+
E = np.sqrt(ref[8+im])
4309+
if reflDict['Type'] == 'SEC':
4310+
E *= np.exp(-flipData['MScorr']*E)
43094311
else:
43104312
E = 0.
43114313
ph = ref[10]

GSASII/GSASIIphsGUI.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2456,6 +2456,7 @@ def OnDysnomia(event):
24562456
def FlipSizer():
24572457
#patches
24582458
if 'k-Max' not in Flip: Flip['k-Max'] = 20.
2459+
if 'MScorr' not in Flip: Flip['MScorr'] = 0.0
24592460
if 'Resolution' in Flip:
24602461
Flip['GridStep'] = Flip['Resolution']
24612462

@@ -2493,14 +2494,18 @@ def OnTestHKL(event):
24932494
Flip['testHKL'][Id] = HKL
24942495
except ValueError:
24952496
HKL = Flip['testHKL'][Id]
2496-
Obj.SetValue('%3d %3d %3d'%(HKL[0],HKL[1],HKL[2]))
2497+
Obj.ChangeValue('%3d %3d %3d'%(HKL[0],HKL[1],HKL[2]))
24972498

24982499
refsList = [item for item in G2gd.GetGPXtreeDataNames(G2frame,['HKLF','PWDR']) if item in data['Histograms'].keys()]
24992500
flipSizer = wx.BoxSizer(wx.VERTICAL)
25002501
lineSizer = wx.BoxSizer(wx.HORIZONTAL)
25012502
lineSizer.Add(wx.StaticText(General,label=' Charge flip controls: Reflection sets: '),0,WACV)
25022503
if 'list' not in str(type(Flip['RefList'])): #patch
25032504
Flip['RefList'] = [Flip['RefList'],]
2505+
refName = Flip['RefList'][0]
2506+
refType = ''
2507+
if refName and refName in data['Histograms']:
2508+
refType = data['Histograms'][refName]['Type']
25042509
lineSizer.Add(wx.ComboBox(General,value=Flip['RefList'][0],choices=Flip['RefList'],
25052510
style=wx.CB_DROPDOWN|wx.CB_READONLY),0,WACV)
25062511
refList = wx.Button(General,label='Select reflection sets')
@@ -2521,6 +2526,9 @@ def OnTestHKL(event):
25212526
line2Sizer.Add(wx.StaticText(General,label=' k-Max (>=10.0): '),0,WACV)
25222527
kMax = G2G.ValidatedTxtCtrl(General,Flip,'k-Max',nDig=(10,1),xmin=10.)
25232528
line2Sizer.Add(kMax,0,WACV)
2529+
if refType == 'SEC':
2530+
line2Sizer.Add(wx.StaticText(General,label=' MScorr (0-0.1): '),0,WACV)
2531+
line2Sizer.Add(G2G.ValidatedTxtCtrl(General,Flip,'MScorr',nDig=(10,4),xmin=0.,xmax=0.10),0,WACV)
25242532
flipSizer.Add(line2Sizer,0)
25252533
line3Sizer = wx.BoxSizer(wx.HORIZONTAL)
25262534
line3Sizer.Add(wx.StaticText(General,label=' Test HKLs:'),0,WACV)

0 commit comments

Comments
 (0)