Changeset 2877 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jun 25, 2017 11:23:22 PM (6 years ago)
Author:
toby
Message:

Plot each histogram after fitting in a sequential refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2871 r2877  
    11811181##### PlotPatterns
    11821182################################################################################
     1183def 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
    11831195def ReplotPattern(G2frame,newPlot,plotType,PatternName=None,PickName=None):
    11841196    '''This does the same as PlotPatterns except that it expects the information
     
    11961208    PlotPatterns(G2frame,newPlot,plotType)
    11971209
    1198 def PlotPatterns(G2frame,newPlot=False,plotType='PWDR'):
     1210def PlotPatterns(G2frame,newPlot=False,plotType='PWDR',data=None):
    11991211    '''Powder pattern plotting package - displays single or multiple powder patterns as intensity vs
    12001212    2-theta, q or TOF. Can display multiple patterns as "waterfall plots" or contour plots. Log I
     
    12201232        return
    12211233#patch
    1222     data = G2frame.PatternTree.GetItemPyData(G2frame.PatternId)
     1234    if data is None:
     1235        data = G2frame.PatternTree.GetItemPyData(G2frame.PatternId)
    12231236    if 'Offset' not in data[0] and plotType in ['PWDR','SASD','REFD']:     #plot offset data
    12241237        Ymax = max(data[1][1])
Note: See TracChangeset for help on using the changeset viewer.