Changeset 2877
- Timestamp:
- Jun 25, 2017 11:23:22 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r2871 r2877 4259 4259 dlg.CenterOnParent() 4260 4260 try: 4261 OK,Msg = G2stMn.SeqRefine(self.GSASprojectfile,dlg ) #Msg is Rvals dict if Ok=True4261 OK,Msg = G2stMn.SeqRefine(self.GSASprojectfile,dlg,G2plt.SequentialPlotPattern,self) #Msg is Rvals dict if Ok=True 4262 4262 finally: 4263 4263 dlg.Update(101.) # forces the Auto_Hide; needed after move w/Win & wx3.0 -
trunk/GSASIIplot.py
r2871 r2877 1181 1181 ##### PlotPatterns 1182 1182 ################################################################################ 1183 def SequentialPlotPattern(G2frame,refdata,histogram): 1184 '''This is passed into :func:`GSASIIstrMain.SeqRefine` where it is used to 1185 provide a plot of the current powder histogram just after a refinement. It 1186 takes the old refinement information (Rfactors, curve locations, etc.) and 1187 combines it with the refinement results in refdata and passes that to 1188 :func:`PlotPatterns` 1189 ''' 1190 if not histogram.startswith('PWDR'): return 1191 G2frame.PatternId = G2gd.GetPatternTreeItemId(G2frame, G2frame.root, histogram) 1192 treedata = G2frame.PatternTree.GetItemPyData(G2frame.PatternId) 1193 PlotPatterns(G2frame,newPlot=True,plotType='PWDR',data=[treedata[0],refdata]) 1194 1183 1195 def ReplotPattern(G2frame,newPlot,plotType,PatternName=None,PickName=None): 1184 1196 '''This does the same as PlotPatterns except that it expects the information … … 1196 1208 PlotPatterns(G2frame,newPlot,plotType) 1197 1209 1198 def PlotPatterns(G2frame,newPlot=False,plotType='PWDR' ):1210 def PlotPatterns(G2frame,newPlot=False,plotType='PWDR',data=None): 1199 1211 '''Powder pattern plotting package - displays single or multiple powder patterns as intensity vs 1200 1212 2-theta, q or TOF. Can display multiple patterns as "waterfall plots" or contour plots. Log I … … 1220 1232 return 1221 1233 #patch 1222 data = G2frame.PatternTree.GetItemPyData(G2frame.PatternId) 1234 if data is None: 1235 data = G2frame.PatternTree.GetItemPyData(G2frame.PatternId) 1223 1236 if 'Offset' not in data[0] and plotType in ['PWDR','SASD','REFD']: #plot offset data 1224 1237 Ymax = max(data[1][1]) -
trunk/GSASIIstrMain.py
r2876 r2877 256 256 return [item for item in phaseVary if item.split(':')[0] in pIds] 257 257 258 def SeqRefine(GPXfile,dlg ):258 def SeqRefine(GPXfile,dlg,PlotFunction=None,G2frame=None): 259 259 '''Perform a sequential refinement -- cycles through all selected histgrams, 260 260 one at a time … … 410 410 IfOK,Rvals,result,covMatrix,sig = RefineCore(Controls,Histo,Phases,restraintDict, 411 411 rigidbodyDict,parmDict,varyList,calcControls,pawleyLookup,ifPrint,printFile,dlg) 412 if PlotFunction: 413 PlotFunction(G2frame,Histo[histogram]['Data'],histogram) 412 414 413 415 print ' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f, last delta chi = %.4f'%(
Note: See TracChangeset
for help on using the changeset viewer.