@@ -5570,15 +5570,15 @@ def OnRefine(self,event):
55705570 txt = G2obj .fmtVarDescr (i )
55715571 tbl .append ((i ,Rvals ['parmDictBeforeFit' ][i ],Rvals ['parmDictAfterFit' ][i ],txt ))
55725572 lbl = f'Refinement results, Rw={ Rw :.3f} '
5573- # ans = G2G.G2AfterFit(self,text,lbl,tbl) # this replaces the next 8 lines
5574- text += '\n Load new result?'
5575- dlg2 = wx .MessageDialog (self ,text ,lbl ,wx .OK | wx .CANCEL )
5576- dlg2 .CenterOnParent ()
5577- ans = False
5578- try :
5579- ans = dlg2 .ShowModal ()
5580- finally :
5581- dlg2 .Destroy ()
5573+ ans = G2G .G2AfterFit (self ,text ,lbl ,tbl ) # this replaces the next 8 lines
5574+ # text += '\nLoad new result?'
5575+ # dlg2 = wx.MessageDialog(self,text,lbl,wx.OK|wx.CANCEL)
5576+ # dlg2.CenterOnParent()
5577+ # ans = False
5578+ # try:
5579+ # ans = dlg2.ShowModal()
5580+ # finally:
5581+ # dlg2.Destroy()
55825582 # replace above with G2G.G2AfterFit line
55835583 if ans == wx .ID_OK : # refinement has been accepted save, log & display
55845584 self .reloadFromGPX (rtext ,Rvals )
@@ -8178,18 +8178,19 @@ def OnPlot1DHKL(event):
81788178 refList = data [1 ]['RefList' ]
81798179 G2plt .Plot1DSngl (G2frame ,newPlot = True ,hklRef = refList ,Super = Super ,Title = phaseName )
81808180
8181- def OnPlot3DHKL (event ):
8182- '''Plots in 3D reciprocal space with green dots proportional to F^2, etc. from single histogram'''
8183- refList = data [1 ]['RefList' ]
8184- FoMax = np .max (refList .T [8 + Super ])
8185- Hmin = np .array ([int (np .min (refList .T [0 ])),int (np .min (refList .T [1 ])),int (np .min (refList .T [2 ]))])
8186- Hmax = np .array ([int (np .max (refList .T [0 ])),int (np .max (refList .T [1 ])),int (np .max (refList .T [2 ]))])
8187- Vpoint = np .array ([int (np .mean (refList .T [0 ])),int (np .mean (refList .T [1 ])),int (np .mean (refList .T [2 ]))])
8188- controls = {'Type' : 'Fosq' ,'Iscale' : False ,'HKLmax' : Hmax ,'HKLmin' : Hmin ,'Zone' :False ,'viewKey' :'L' ,
8189- 'FoMax' : FoMax ,'Scale' : 1.0 ,'Drawing' :{'viewPoint' :[Vpoint ,[]],'default' :Vpoint [:],
8190- 'backColor' :[0 ,0 ,0 ],'depthFog' :False ,'Zclip' :10.0 ,'cameraPos' :10. ,'Zstep' :0.05 ,'viewUp' :[0 ,1 ,0 ],
8191- 'Scale' :1.0 ,'oldxy' :[],'viewDir' :[0 ,0 ,1 ]},'Super' :Super ,'SuperVec' :SuperVec }
8192- G2plt .Plot3DSngl (G2frame ,newPlot = True ,Data = controls ,hklRef = refList ,Title = phaseName )
8181+ # def OnPlot3DHKL(event):
8182+ # '''Plots in 3D reciprocal space with green dots proportional to F^2, etc. from single histogram'''
8183+ # refList = data[1]['RefList']
8184+ # FoMax = np.max(refList.T[8+Super])
8185+ # Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))])
8186+ # Hmax = np.array([int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))])
8187+ # Vpoint = np.array([int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))])
8188+ # controls = {'Type' : 'Fosq','Iscale' : False,'HKLmax' : Hmax,'HKLmin' : Hmin,'Zone':False,'viewKey':'L',
8189+ # 'FoMax' : FoMax,'Scale' : 1.0,'Drawing':{'viewPoint':[Vpoint,[]],'default':Vpoint[:],
8190+ # 'microED':{'Nexp':[False,0],'Ztilt':[False,0]},
8191+ # 'backColor':[0,0,0],'depthFog':False,'Zclip':10.0,'cameraPos':10.,'Zstep':0.05,'viewUp':[0,1,0],
8192+ # 'Scale':1.0,'oldxy':[],'viewDir':[0,0,1]},'Super':Super,'SuperVec':SuperVec}
8193+ # G2plt.Plot3DSngl(G2frame,newPlot=True,Data=controls,hklRef=refList,Title=phaseName)
81938194
81948195 def OnPlotAll3DHKL (event ):
81958196 '''Plots in 3D reciprocal space with green dots proportional to F^2, etc. from all SHKL histograms'''
@@ -8478,7 +8479,7 @@ def OnEditMag(**args):
84788479 G2frame .Bind (wx .EVT_MENU , OnErrorAnalysis , id = G2G .wxID_PWDANALYSIS )
84798480 G2frame .Bind (wx .EVT_MENU , OnMergeHKL , id = G2G .wxID_MERGEHKL )
84808481 G2frame .Bind (wx .EVT_MENU , OnPlot1DHKL , id = G2G .wxID_1DHKLSTICKPLOT )
8481- G2frame .Bind (wx .EVT_MENU , OnPlot3DHKL , id = G2G .wxID_PWD3DHKLPLOT )
8482+ # G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2G.wxID_PWD3DHKLPLOT)
84828483 G2frame .Bind (wx .EVT_MENU , OnPlotAll3DHKL , id = G2G .wxID_3DALLHKLPLOT )
84838484# G2frame.Bind(wx.EVT_MENU, OnPlotFoVsFc, id=G2G.wxID_FOVSFCPLOT)
84848485 G2frame .Bind (wx .EVT_MENU , OnFixFsqFsq , id = G2G .wxID_FIXFSQSQDATA )
@@ -8679,6 +8680,7 @@ def OnEditMag(**args):
86798680 controls = {'Type' : 'Fo' ,'ifFc' : True ,'dType' :data [1 ]['Type' ],
86808681 'HKLmax' : [int (np .max (refList .T [0 ])),int (np .max (refList .T [1 ])),int (np .max (refList .T [2 ]))],
86818682 'HKLmin' : [int (np .min (refList .T [0 ])),int (np .min (refList .T [1 ])),int (np .min (refList .T [2 ]))],
8683+ 'microED' :{'Nexp' :[False ,0 ],'Ztilt' :[False ,0 ]},
86828684 'FoMax' : FoMax ,'Zone' : '001' ,'Layer' : 0 ,'Scale' : 1.0 ,'Super' :Super ,'SuperVec' :SuperVec }
86838685 G2plt .PlotSngl (G2frame ,newPlot = True ,Data = controls ,hklRef = refList )
86848686 G2frame .dataWindow .SetDataSize ()
0 commit comments