@@ -6642,7 +6642,7 @@ def _makemenu(): # routine to create menu when first used
66426642 self .PWDRMenu = _makemenu
66436643
66446644 # HKLF - many wxIDs defined in PWDR & SASD above
6645- G2G .Define_wxId ('wxID_3DALLHKLPLOT' ,'wxID_MERGEHKL' ,'wxID_FIXFSQSQDATA' , 'wxID_FOVSFCPLOT' )
6645+ G2G .Define_wxId ('wxID_3DALLHKLPLOT' ,'wxID_MERGEHKL' ,'wxID_FIXFSQSQDATA' )
66466646 def _makemenu (): # routine to create menu when first used
66476647 self .HKLFMenu = wx .MenuBar ()
66486648 self .PrefillDataMenu (self .HKLFMenu )
@@ -6651,7 +6651,6 @@ def _makemenu(): # routine to create menu when first used
66516651 self .ErrorAnal .Append (G2G .wxID_PWDANALYSIS ,'Error Analysis' ,'Error analysis on single crystal data' )
66526652 self .ErrorAnal .Append (G2G .wxID_MERGEHKL ,'Merge HKLs' ,'Transform & merge HKLF data to new histogram' )
66536653 self .ErrorAnal .Append (G2G .wxID_1DHKLSTICKPLOT ,'Plot 1D HKLs' ,'Plot of HKLs from single crystal data in 1D' )
6654- self .ErrorAnal .Append (G2G .wxID_FOVSFCPLOT ,'Plot Fo-Fc vs Fc' ,'Plot Fo-Fc vs Fc from single crystal data' )
66556654 self .ErrorAnal .Append (G2G .wxID_3DALLHKLPLOT ,'Plot all 3D HKLs' ,'Plot HKLs from all single crystal data in 3D' )
66566655 self .ErrorAnal .Append (G2G .wxID_FIXFSQSQDATA ,'Fix (F^2)^2 data' ,'Fix F^2 data imported as F' )
66576656 # self.ErrorAnal.Append(G2G.wxID_PWDCOPY,'Copy params','Copy of HKLF parameters') #unused
@@ -8054,14 +8053,6 @@ def OnPlotAll3DHKL(event):
80548053 'Scale' :1.0 ,'oldxy' :[],'viewDir' :[1 ,0 ,0 ]},'Super' :Super ,'SuperVec' :SuperVec }
80558054 G2plt .Plot3DSngl (G2frame ,newPlot = True ,Data = controls ,hklRef = refList ,Title = phaseName )
80568055
8057- def OnPlotFoVsFc (event ):
8058- ''' Plots Fo-Fc & 1/ExtC vs Fc for single crystal data '''
8059- refList = data [1 ]['RefList' ]
8060- XY = np .array ([xy [8 + Super :10 + Super ] for xy in refList if xy [3 + Super ]> 0 ])
8061- XE = np .array ([[np .sqrt (xy [9 + Super ]),1. / xy [11 + Super ]] for xy in refList if xy [3 + Super ]> 0 ]).T
8062- XY = np .sqrt (np .abs (XY )).T
8063- G2plt .PlotXY (G2frame ,[[XY [1 ],XY [0 ]- XY [1 ]],],XY2 = [XE ,],labelX = '|Fc|' ,labelY = '|Fo|-|Fc|, 1/ExtC' ,newPlot = False ,
8064- Title = '|Fo|-|Fc| vs |Fc|' ,lines = False ,points2 = True ,names = ['|Fo|-|Fc|' ,],names2 = ['1/ExtC' ,])
80658056
80668057 def OnMergeHKL (event ):
80678058 '''Merge HKLF data sets to unique set according to Laue symmetry'''
@@ -8207,8 +8198,19 @@ def OnFixFsqFsq(event):
82078198 def OnErrorAnalysis (event ):
82088199 '''Plots an "Abrams" plot - sorted delta/sig across data set.
82098200 Should be straight line of slope 1 - never is'''
8201+ def OnPlotFoFcVsFc (kind ):
8202+ ''' Extinction check, plots Fo-Fc & 1/ExtC vs Fc for single crystal data '''
8203+ iFo ,iFc ,iExt = 8 ,9 ,11
8204+ refList = data [1 ]['RefList' ]
8205+ XY = np .array ([xy [iFo + Super :1 + iFc + Super ] for xy in refList if xy [3 + Super ]> 0 ])
8206+ XE = np .array ([[np .sqrt (xy [iFc + Super ]),1. / xy [iExt + Super ]] for xy in refList if xy [3 + Super ]> 0 ]).T
8207+ XY = np .sqrt (np .abs (XY )).T
8208+ G2plt .PlotXY (G2frame ,[[XY [1 ],XY [0 ]- XY [1 ]],],XY2 = [XE ,],labelX = '|Fc|' ,labelY = '|Fo|-|Fc|, 1/ExtC' ,newPlot = False ,
8209+ Title = 'Extinction check' ,lines = False ,points2 = True ,names = ['|Fo|-|Fc|' ,],names2 = ['1/ExtC' ,])
82108210 G2plt .PlotDeltSig (G2frame ,kind )
8211-
8211+ if kind in ['HKLF' ,]:
8212+ OnPlotFoFcVsFc (kind )
8213+
82128214# def OnCompression(event):
82138215# data[0] = int(comp.GetValue())
82148216
@@ -8265,7 +8267,8 @@ def OnEditMag(**args):
82658267#end patches
82668268 if kind in ['PWDR' ,'SASD' ,'REFD' ]:
82678269 SetDataMenuBar (G2frame ,G2frame .dataWindow .PWDRMenu )
8268- G2frame .Bind (wx .EVT_MENU , OnErrorAnalysis , id = G2G .wxID_PWDANALYSIS )
8270+ if kind in ['PWDR' ,]:
8271+ G2frame .Bind (wx .EVT_MENU , OnErrorAnalysis , id = G2G .wxID_PWDANALYSIS )
82698272 G2frame .Bind (wx .EVT_MENU , onCopySelectedItems , id = G2G .wxID_PWDCOPY )
82708273 G2frame .Bind (wx .EVT_MENU , onCopyPlotCtrls , id = G2G .wxID_PLOTCTRLCOPY )
82718274 elif kind in ['HKLF' ,]:
@@ -8275,7 +8278,7 @@ def OnEditMag(**args):
82758278 G2frame .Bind (wx .EVT_MENU , OnPlot1DHKL , id = G2G .wxID_1DHKLSTICKPLOT )
82768279 G2frame .Bind (wx .EVT_MENU , OnPlot3DHKL , id = G2G .wxID_PWD3DHKLPLOT )
82778280 G2frame .Bind (wx .EVT_MENU , OnPlotAll3DHKL , id = G2G .wxID_3DALLHKLPLOT )
8278- G2frame .Bind (wx .EVT_MENU , OnPlotFoVsFc , id = G2G .wxID_FOVSFCPLOT )
8281+ # G2frame.Bind(wx.EVT_MENU, OnPlotFoVsFc, id=G2G.wxID_FOVSFCPLOT)
82798282 G2frame .Bind (wx .EVT_MENU , OnFixFsqFsq , id = G2G .wxID_FIXFSQSQDATA )
82808283 if kind == 'PWDR' :
82818284 lbl = 'Powder'
0 commit comments