Changeset 3712 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Oct 30, 2018 8:50:07 AM (4 years ago)
Author:
vondreele
Message:

add new configuration item: PDF_Rmax maximum radius for G(r) calculations; rarely changed by user
Change PDF GUI Rmax to be for the max r for G(r) plot - no longer r max for calculation
This speeds up optimization
Fix problems with PDF peak table - principally the rowlabels needed to be str not int - crashed wx 4.0 & gave bizarre effects in wx 3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3709 r3712  
    65076507        sqBox.Add(resetQ,0,WACV)
    65086508        resetQ.Bind(wx.EVT_BUTTON, OnResetQ)
    6509         sqBox.Add(wx.StaticText(G2frame.dataWindow,label=' Rmax: '),0,WACV)
     6509        sqBox.Add(wx.StaticText(G2frame.dataWindow,label=' Plot Rmax: '),0,WACV)
    65106510        rmax = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data,'Rmax',nDig=(10,1),min=10.,max=200.,
    65116511            typeHint=float,OnLeave=AfterChangeNoRefresh,size=wx.Size(50,20))
     
    65806580            G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "PDF" pattern')
    65816581            return
    6582         od = {'label_1':'Only refine flag','value_1':False}
     6582        od = {'label_1':'Only refine flag','value_1':False,'label_2':'Only Lorch flag','value_2':False}
    65836583        dlg = G2G.G2MultiChoiceDialog(G2frame,'Copy PDF controls','Copy controls from '+Source+' to:',TextList,extraOpts=od)
    65846584        try:
     
    65906590                    if od['value_1']:
    65916591                        olddata['Sample Bkg.']['Refine'] = data['Sample Bkg.']['Refine']    #only one flag
     6592                    elif od['value_2']:
     6593                        olddata['Lorch'] = data['Lorch']    #only one flag                       
    65926594                    else:
    65936595                        sample = olddata['Sample']
     
    66896691            G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='G(R)')
    66906692        else:
    6691             G2plt.PlotISFG(G2frame,data,newPlot=False)
     6693            G2plt.PlotISFG(G2frame,data,newPlot=True)
    66926694       
    66936695    def OnComputeAllPDF(event):
     
    68626864            peaks['Background'][2] = refbk.GetValue()
    68636865       
    6864         backBox = wx.wx.BoxSizer(wx.HORIZONTAL)
     6866        backBox = wx.BoxSizer(wx.HORIZONTAL)
    68656867        backBox.Add(wx.StaticText(G2frame.dataWindow,label=' Background slope: '),0,WACV)
    68666868        slope = G2G.ValidatedTxtCtrl(G2frame.dataWindow,peaks['Background'][1],1,nDig=(10,3),
     
    69036905        Types = 3*[wg.GRID_VALUE_FLOAT+':10,3',]+[wg.GRID_VALUE_CHOICE+': ,P,M,S,PM,PS,MS,PMS',]+     \
    69046906            2*[wg.GRID_VALUE_STRING,]+[wg.GRID_VALUE_FLOAT+':10,3',]
    6905         rowLabels = range(len(peaks['Peaks']))
     6907        rowLabels = [str(i) for i in range(len(peaks['Peaks']))]
    69066908        peakTable = G2G.Table(peaks['Peaks'],rowLabels=rowLabels,colLabels=colLabels,types=Types)
    69076909        PDFPeaks = G2G.GSGrid(G2frame.dataWindow)
    6908         PDFPeaks.SetTable(peakTable,False)
    6909         PDFPeaks.SetMargins(0,0)
    6910         PDFPeaks.SetRowLabelSize(40)
     6910        PDFPeaks.SetTable(peakTable,True)
    69116911        PDFPeaks.AutoSizeColumns(False)
    69126912        PDFPeaks.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, PeaksRefine)
Note: See TracChangeset for help on using the changeset viewer.