Changeset 2645 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Jan 18, 2017 7:00:20 PM (5 years ago)
Author:
toby
Message:

improve PDF opt; add PDF opt to Compute All PDFs; rename to Setup PDFs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2642 r2645  
    150150
    151151[ wxID_PDFCOPYCONTROLS, wxID_PDFSAVECONTROLS, wxID_PDFLOADCONTROLS,
    152     wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL, wxID_PDFADDELEMENT, wxID_PDFDELELEMENT, wxID_PDFOPT,
    153 ] = [wx.NewId() for item in range(8)]
     152    wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL, wxID_PDFADDELEMENT, wxID_PDFDELELEMENT, #wxID_PDFOPT,
     153] = [wx.NewId() for item in range(7)]
    154154
    155155[ wxID_MCRON,wxID_MCRLIST,wxID_MCRSAVE,wxID_MCRPLAY,
     
    21772177        self.PDFEdit.Append(help='Compute all PDFs', id=wxID_PDFCOMPUTEALL, kind=wx.ITEM_NORMAL,
    21782178            text='Compute all PDFs')
    2179         self.PDFEdit.Append(help='Optimize PDF', id=wxID_PDFOPT, kind=wx.ITEM_NORMAL,
    2180             text='Optimize corrections for r<Rmin section of current G(r)')
     2179#        self.PDFEdit.Append(help='Optimize PDF', id=wxID_PDFOPT, kind=wx.ITEM_NORMAL,
     2180#            text='Optimize corrections for r<Rmin section of current G(r)')
    21812181        self.PostfillDataMenu()
    21822182       
     
    45524552        elif G2frame.PatternTree.GetItemText(item).startswith('PDF '):
    45534553            G2frame.PatternId = item
    4554             for i in G2frame.ExportPDF: i.Enable(True)
     4554            for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
     4555            data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,item,'PDF Controls'))
     4556            G2pdG.UpdatePDFGrid(G2frame,data)
    45554557            G2plt.PlotISFG(G2frame,plotType='S(Q)')
    45564558        elif G2frame.PatternTree.GetItemText(item) == 'Phases':
     
    45594561                value='Select one phase to see its parameters')           
    45604562    elif 'I(Q)' in G2frame.PatternTree.GetItemText(item):
     4563        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    45614564        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    45624565        data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
     
    45644567        G2plt.PlotISFG(G2frame,plotType='I(Q)',newPlot=True)
    45654568    elif 'S(Q)' in G2frame.PatternTree.GetItemText(item):
     4569        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    45664570        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    45674571        data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
     
    45694573        G2plt.PlotISFG(G2frame,plotType='S(Q)',newPlot=True)
    45704574    elif 'F(Q)' in G2frame.PatternTree.GetItemText(item):
     4575        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    45714576        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    45724577        data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
     
    45744579        G2plt.PlotISFG(G2frame,plotType='F(Q)',newPlot=True)
    45754580    elif 'G(R)' in G2frame.PatternTree.GetItemText(item):
     4581        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    45764582        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    45774583        data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
    45784584        G2pdG.UpdatePDFGrid(G2frame,data)
    45794585        G2plt.PlotISFG(G2frame,plotType='G(R)',newPlot=True)           
     4586    elif G2frame.PatternTree.GetItemText(item) == 'PDF Controls':
     4587        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
     4588        G2frame.dataFrame.helpKey = G2frame.PatternTree.GetItemText(item) # special treatment to avoid PDF_PDF Controls
     4589        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
     4590        data = G2frame.PatternTree.GetItemPyData(item)
     4591        G2pdG.UpdatePDFGrid(G2frame,data)
     4592        G2plt.PlotISFG(G2frame,plotType='I(Q)')
     4593        G2plt.PlotISFG(G2frame,plotType='S(Q)')
     4594        G2plt.PlotISFG(G2frame,plotType='F(Q)')
     4595        G2plt.PlotISFG(G2frame,plotType='G(R)')
    45804596    elif G2frame.PatternTree.GetItemText(parentID) == 'Phases':
    45814597        data = G2frame.PatternTree.GetItemPyData(item)
     
    46144630        G2plt.PlotImage(G2frame,newPlot=False)
    46154631        G2imG.UpdateStressStrain(G2frame,strsta)
    4616     elif G2frame.PatternTree.GetItemText(item) == 'PDF Controls':
    4617         G2frame.dataFrame.helpKey = G2frame.PatternTree.GetItemText(item) # special treatment, not PDF_PDF Controls
    4618         G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    4619         for i in G2frame.ExportPDF: i.Enable(True)
    4620         data = G2frame.PatternTree.GetItemPyData(item)
    4621         G2pdG.UpdatePDFGrid(G2frame,data)
    4622         G2plt.PlotISFG(G2frame,plotType='I(Q)')
    4623         G2plt.PlotISFG(G2frame,plotType='S(Q)')
    4624         G2plt.PlotISFG(G2frame,plotType='F(Q)')
    4625         G2plt.PlotISFG(G2frame,plotType='G(R)')
    46264632    elif G2frame.PatternTree.GetItemText(item) == 'Peak List':
    46274633        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
Note: See TracChangeset for help on using the changeset viewer.