@@ -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' )
6645+ G2G .Define_wxId ('wxID_3DALLHKLPLOT' ,'wxID_MERGEHKL' ,'wxID_FIXFSQSQDATA' , 'wxID_FOVSFCPLOT' )
66466646 def _makemenu (): # routine to create menu when first used
66476647 self .HKLFMenu = wx .MenuBar ()
66486648 self .PrefillDataMenu (self .HKLFMenu )
@@ -6651,7 +6651,7 @@ 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_PWD3DHKLPLOT ,'Plot 3D HKLs ' ,'Plot HKLs from single crystal data in 3D ' )
6654+ self .ErrorAnal .Append (G2G .wxID_FOVSFCPLOT ,'Plot Fo vs Fc ' ,'Plot Fo vs Fc from single crystal data' )
66556655 self .ErrorAnal .Append (G2G .wxID_3DALLHKLPLOT ,'Plot all 3D HKLs' ,'Plot HKLs from all single crystal data in 3D' )
66566656 self .ErrorAnal .Append (G2G .wxID_FIXFSQSQDATA ,'Fix (F^2)^2 data' ,'Fix F^2 data imported as F' )
66576657 # self.ErrorAnal.Append(G2G.wxID_PWDCOPY,'Copy params','Copy of HKLF parameters') #unused
@@ -7500,10 +7500,7 @@ def onPlotNotebook():
75007500 elif '[' not in ls [0 ] or '[REF]' in ls [0 ]:
75017501 if target not in l : continue
75027502 try :
7503- vals .append (
7504- float (l .split (target )[1 ].split (',' )[0 ]
7505- .replace ('=' ,'' ).replace ('%' ,'' ))
7506- )
7503+ vals .append (float (l .split (target )[1 ].split (',' )[0 ].replace ('=' ,'' ).replace ('%' ,'' )))
75077504 except :
75087505 continue
75097506 Y = np .array (vals )
@@ -8056,6 +8053,15 @@ def OnPlotAll3DHKL(event):
80568053 'backColor' :[0 ,0 ,0 ],'depthFog' :False ,'Zclip' :10.0 ,'cameraPos' :10. ,'Zstep' :0.05 ,'viewUp' :[0 ,1 ,0 ],
80578054 'Scale' :1.0 ,'oldxy' :[],'viewDir' :[1 ,0 ,0 ]},'Super' :Super ,'SuperVec' :SuperVec }
80588055 G2plt .Plot3DSngl (G2frame ,newPlot = True ,Data = controls ,hklRef = refList ,Title = phaseName )
8056+
8057+ def OnPlotFoVsFc (event ):
8058+ ''' Plots Fo vs Fc for single crystal data '''
8059+ Name = G2frame .GPXtree .GetItemText (G2frame .PatternId )
8060+ refList = data [1 ]['RefList' ]
8061+ XY = np .sqrt (np .abs (refList .T [8 + Super :10 + Super ]))
8062+ FoMax = np .max (XY [0 ])
8063+ G2plt .PlotXY (G2frame ,[[XY [1 ],XY [0 ]],],XY2 = [[[0. ,FoMax ],[0. ,FoMax ]],],labelX = '|Fc|' ,labelY = '|Fo|' ,newPlot = False ,
8064+ Title = '|Fo| vs |Fc| for %s' % Name ,lines = False ,names = ['|Fo| vs |Fc|' ,],names2 = ['Fo=Fc' ,])
80598065
80608066 def OnMergeHKL (event ):
80618067 '''Merge HKLF data sets to unique set according to Laue symmetry'''
@@ -8269,6 +8275,7 @@ def OnEditMag(**args):
82698275 G2frame .Bind (wx .EVT_MENU , OnPlot1DHKL , id = G2G .wxID_1DHKLSTICKPLOT )
82708276 G2frame .Bind (wx .EVT_MENU , OnPlot3DHKL , id = G2G .wxID_PWD3DHKLPLOT )
82718277 G2frame .Bind (wx .EVT_MENU , OnPlotAll3DHKL , id = G2G .wxID_3DALLHKLPLOT )
8278+ G2frame .Bind (wx .EVT_MENU , OnPlotFoVsFc , id = G2G .wxID_FOVSFCPLOT )
82728279 G2frame .Bind (wx .EVT_MENU , OnFixFsqFsq , id = G2G .wxID_FIXFSQSQDATA )
82738280 if kind == 'PWDR' :
82748281 lbl = 'Powder'
0 commit comments