Changeset 2659


Ignore:
Timestamp:
Jan 24, 2017 1:58:38 PM (5 years ago)
Author:
vondreele
Message:

make lab data (2 x-ray wavelengths) instrument default 'Bragg-Brentano', all others 'Debye-Scherrer'
refactor PDF stuff to show PDF Controls & (new) PDF Peaks on G2 tree (removing I(Q)...).
Old gpx files with I(Q)... updated automatically to new scheme
Add new tree item for PDF Peaks - does nothing yet.
Fix FWHM calc for TOF so bins/FWHM on peak fitting make sense.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2658 r2659  
    12021202                    v = (v[0],v[2],v[4])
    12031203                    codes = [0,0,0,0]
     1204                    rd.Sample['Type'] = 'Debye-Scherrer'
    12041205                else:
    12051206                    names = ['Type','Lam1','Lam2','Zero','I(L2)/I(L1)','Polariz.','U','V','W','X','Y','SH/L','Azimuth']
    12061207                    codes = [0,0,0,0,0,0]
     1208                    rd.Sample['Type'] = 'Bragg-Brentano'
    12071209                data.extend(v)
    12081210                if 'INS  1PRCF  ' in Iparm:
     
    13401342                if res is None: return None
    13411343                rd.instfile = ''
     1344                if 'lab data' in choices[res]:
     1345                    rd.Sample['Type'] = 'Bragg-Brentano'
     1346                else:
     1347                    rd.Sample['Type'] = 'Debye-Scherrer'
    13421348                if 'Generic' in choices[res]:
    13431349                    dlg = G2G.MultiFloatDialog(self,title='Generic TOF detector bank',
     
    36003606                            'Geometry':'Cylinder','Diam':1.0,'Pack':0.50,'Form Vol':10.0,
    36013607                            'DetType':'Image plate','ObliqCoeff':0.2,'Ruland':0.025,'QScaleLim':Qlimits[i],
    3602                             'Lorch':False,'BackRatio':0.0,'Rmax':100.,'noRing':False,'IofQmin':1.0}
     3608                            'Lorch':False,'BackRatio':0.0,'Rmax':100.,'noRing':False,'IofQmin':1.0,
     3609                            'I(Q)':[],'S(Q)':[],'F(Q)':[],'G(R)':[]}
    36033610                        self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='PDF Controls'),Data)
    3604                         self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='I(Q)'+PWDRname),[])       
    3605                         self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='S(Q)'+PWDRname),[])       
    3606                         self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='F(Q)'+PWDRname),[])       
    3607                         self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='G(R)'+PWDRname),[])       
     3611                        self.PatternTree.SetItemPyData(self.PatternTree.AppendItem(Id,text='PDF Peaks'),
     3612                            {'Limits':[1.,5.],'Background':[2,[0.,-0.2*np.pi],False],'Peaks':[]})       
    36083613                for item in self.ExportPDF: item.Enable(True)
    36093614            finally:
  • trunk/GSASIIIO.py

    r2625 r2659  
    784784                        for p in datum[1]['PythonVersions']:
    785785                            print("  {:<12s} {:s}".format(p[0]+':',p[1]))
     786            oldPDF = False
    786787            for datus in data[1:]:
     788#patch - 1/23/17 PDF cleanup
     789                if datus[0][:4] in ['I(Q)','S(Q)','F(Q)','G(R)']:
     790                    oldPDF = True
     791                    data[1][1][datus[0][:4]] = copy.deepcopy(datus[1][:2])
     792                    continue
     793#end PDF cleanup
    787794                sub = G2frame.PatternTree.AppendItem(Id,datus[0])
    788795#patch
     
    796803#end patch
    797804                G2frame.PatternTree.SetItemPyData(sub,datus[1])
     805            if 'PDF ' in datum[0][:4] and oldPDF:
     806                sub = G2frame.PatternTree.AppendItem(Id,'PDF Peaks')
     807                G2frame.PatternTree.SetItemPyData(sub,{'Limits':[1.,5.],'Background':[2,[0.,-0.2*np.pi],False],'Peaks':[]})
    798808            if datum[0].startswith('IMG'):                   #retrieve image default flag & data if set
    799809                Data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id,'Image Controls'))
     
    985995    for export in exports:
    986996        PickId = G2gd.GetPatternTreeItemId(G2frame, G2frame.root, export)
    987         SQname = 'S(Q)'+export[4:]
    988         FQname = 'F(Q)'+export[4:]
    989         GRname = 'G(R)'+export[4:]
     997        PDFControls = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame, PickId,'PDF Controls'))
    990998        sqfilename = ospath.join(G2frame.dirname,export.replace(' ','_')[5:]+'.sq')
    991999        fqfilename = ospath.join(G2frame.dirname,export.replace(' ','_')[5:]+'.fq')
    9921000        grfilename = ospath.join(G2frame.dirname,export.replace(' ','_')[5:]+'.gr')
    993         sqId = G2gd.GetPatternTreeItemId(G2frame, PickId, SQname)
    994         fqId = G2gd.GetPatternTreeItemId(G2frame, PickId, FQname)
    995         grId = G2gd.GetPatternTreeItemId(G2frame, PickId, GRname)
    996         sqdata = np.array(G2frame.PatternTree.GetItemPyData(sqId)[1][:2])
     1001        sqdata = PDFControls['S(Q)'][1]
    9971002        sqfxn = scintp.interp1d(sqdata[0],sqdata[1],kind='linear')
    998         fqdata = np.array(G2frame.PatternTree.GetItemPyData(fqId)[1][:2])
     1003        fqdata = PDFControls['F(Q)'][1]
    9991004        fqfxn = scintp.interp1d(fqdata[0],fqdata[1],kind='linear')
    1000         grdata = np.array(G2frame.PatternTree.GetItemPyData(grId)[1][:2])
     1005        grdata = PDFControls['G(R)'][1]
    10011006        grfxn = scintp.interp1d(grdata[0],grdata[1],kind='linear')
    10021007        sqfile = open(sqfilename,'w')
  • trunk/GSASIIgrid.py

    r2657 r2659  
    149149] = [wx.NewId() for item in range(5)]
    150150
    151 [ wxID_PDFCOPYCONTROLS, wxID_PDFSAVECONTROLS, wxID_PDFLOADCONTROLS,
    152     wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL, wxID_PDFADDELEMENT, wxID_PDFDELELEMENT, #wxID_PDFOPT,
    153 ] = [wx.NewId() for item in range(7)]
     151[ wxID_PDFCOPYCONTROLS, wxID_PDFSAVECONTROLS, wxID_PDFLOADCONTROLS, wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL,
     152    wxID_PDFADDELEMENT, wxID_PDFDELELEMENT, wxID_PDFPKSFIT,wxID_PDFPKSFITALL,wxID_PDFCOPYPEAKS,
     153] = [wx.NewId() for item in range(10)]
    154154
    155155[ wxID_MCRON,wxID_MCRLIST,wxID_MCRSAVE,wxID_MCRPLAY,
     
    21802180#            text='Optimize corrections for r<Rmin section of current G(r)')
    21812181        self.PostfillDataMenu()
     2182       
     2183        # PDF / PDF Peaks
     2184        self.PDFPksMenu = wx.MenuBar()
     2185        self.PrefillDataMenu(self.PDFPksMenu)
     2186        self.PDFPksEdit = wx.Menu(title='')
     2187        self.PDFPksMenu.Append(menu=self.PDFPksEdit, title='PDF Peaks')
     2188        self.PDFPksEdit.Append(help='Fit PDF peaks', id=wxID_PDFPKSFIT, kind=wx.ITEM_NORMAL,
     2189            text='Fit Peaks')
     2190        self.PDFPksEdit.Append(help='Fit all PDF peaks', id=wxID_PDFPKSFITALL, kind=wx.ITEM_NORMAL,
     2191            text='Fit all PDF peakss')
     2192        self.PDFPksEdit.Append(help='Copy PDF peaks', id=wxID_PDFCOPYPEAKS, kind=wx.ITEM_NORMAL,
     2193            text='Copy peaks')
     2194       
     2195        self.PostfillDataMenu()
     2196
    21822197       
    21832198        # Phase / General tab
     
    45674582            data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,item,'PDF Controls'))
    45684583            G2pdG.UpdatePDFGrid(G2frame,data)
    4569             G2plt.PlotISFG(G2frame,plotType='S(Q)')
     4584            G2plt.PlotISFG(G2frame,data,plotType='G(R)')
    45704585        elif G2frame.PatternTree.GetItemText(item) == 'Phases':
    45714586            G2frame.dataFrame.setSizePosLeft(defWid)
    45724587            wx.TextCtrl(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize(),
    45734588                value='Select one phase to see its parameters')           
    4574     elif 'I(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)
     4589    elif G2frame.PatternTree.GetItemText(item) == 'PDF Peaks':
    45764590        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
     4591        peaks = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Peaks'))
    45774592        data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
    4578         G2pdG.UpdatePDFGrid(G2frame,data)
    4579         G2plt.PlotISFG(G2frame,plotType='I(Q)',newPlot=True)
    4580     elif 'S(Q)' 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)
    4582         G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    4583         data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
    4584         G2pdG.UpdatePDFGrid(G2frame,data)
    4585         G2plt.PlotISFG(G2frame,plotType='S(Q)',newPlot=True)
    4586     elif 'F(Q)' in G2frame.PatternTree.GetItemText(item):
    4587         for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    4588         G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    4589         data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
    4590         G2pdG.UpdatePDFGrid(G2frame,data)
    4591         G2plt.PlotISFG(G2frame,plotType='F(Q)',newPlot=True)
    4592     elif 'G(R)' in G2frame.PatternTree.GetItemText(item):
    4593         for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
    4594         G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
    4595         data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId(G2frame,G2frame.PatternId,'PDF Controls'))
    4596         G2pdG.UpdatePDFGrid(G2frame,data)
    4597         G2plt.PlotISFG(G2frame,plotType='G(R)',newPlot=True)           
     4593        G2pdG.UpdatePDFPeaks(G2frame,peaks,data)
     4594        G2plt.PlotISFG(G2frame,data,plotType='G(R)',newPlot=True,peaks=peaks)           
    45984595    elif G2frame.PatternTree.GetItemText(item) == 'PDF Controls':
    45994596        for i in G2frame.ExportPDF: i.Enable(True) # this should be done on .gpx load; is done on OnMakePDFs (GSASII.py)
     
    46024599        data = G2frame.PatternTree.GetItemPyData(item)
    46034600        G2pdG.UpdatePDFGrid(G2frame,data)
    4604         G2plt.PlotISFG(G2frame,plotType='I(Q)')
    4605         G2plt.PlotISFG(G2frame,plotType='S(Q)')
    4606         G2plt.PlotISFG(G2frame,plotType='F(Q)')
    4607         G2plt.PlotISFG(G2frame,plotType='G(R)')
     4601        G2plt.PlotISFG(G2frame,data,plotType='I(Q)')
     4602        G2plt.PlotISFG(G2frame,data,plotType='S(Q)')
     4603        G2plt.PlotISFG(G2frame,data,plotType='F(Q)')
     4604        G2plt.PlotISFG(G2frame,data,plotType='G(R)')
    46084605    elif G2frame.PatternTree.GetItemText(parentID) == 'Phases':
    46094606        data = G2frame.PatternTree.GetItemPyData(item)
  • trunk/GSASIIplot.py

    r2654 r2659  
    23492349################################################################################
    23502350           
    2351 def PlotISFG(G2frame,newPlot=False,plotType=''):
     2351def PlotISFG(G2frame,data,newPlot=False,plotType='',peaks=None):
    23522352    ''' Plotting package for PDF analysis; displays I(Q), S(Q), F(Q) and G(r) as single
    23532353    or multiple plots with waterfall and contour plots as options
     
    23892389            Page.Offset[0] += 1.
    23902390        elif event.key == 'o':
    2391             Page.Offset = [0,0]
     2391            if G2frame.Contour:
     2392                G2frame.Interpolate = 'nearest'
     2393                G2frame.Cmin = 0.0
     2394                G2frame.Cmax = 1.0
     2395            else:
     2396                Page.Offset = [0,0]           
    23922397        elif event.key == 'm':
    23932398            G2frame.SinglePlot = not G2frame.SinglePlot
     
    23972402            if G2frame.Contour:
    23982403                G2frame.SinglePlot = False
     2404            else:
    23992405                Page.Offset = [0.,0.]
     2406                G2frame.SinglePlot = not G2frame.SinglePlot
    24002407        elif not G2frame.Contour and event.key == 'w':
    24012408            G2frame.Waterfall = not G2frame.Waterfall
     
    24362443        elif event.key == 't' and not G2frame.Contour:
    24372444            G2frame.Legend = not G2frame.Legend
    2438         PlotISFG(G2frame,newPlot=newPlot,plotType=plotType)
     2445        PlotISFG(G2frame,data,newPlot=newPlot,plotType=plotType)
    24392446       
    24402447    def OnMotion(event):
     
    24662473   
    24672474    G2frame.G2plotNB.status.DestroyChildren()
    2468     if G2frame.Contour:
    2469         Page.Choice = (' key press','d: lower contour max','u: raise contour max',
    2470             'D: lower contour min','U: raise contour min',
    2471             'i: interpolation method','s: color scheme','c: contour off','f: select data',
    2472             )
     2475    if peaks == None:
     2476        if G2frame.Contour:
     2477            Page.Choice = (' key press','d: lower contour max','u: raise contour max',
     2478                'D: lower contour min','U: raise contour min','o: reset to default',
     2479                'i: interpolation method','s: color scheme','c: contour off','f: select data',
     2480                )
     2481        else:
     2482            Page.Choice = (' key press','l: offset left','r: offset right','d: offset down','u: offset up',
     2483                'o: reset offset','t: toggle legend','c: contour on','w: toggle waterfall colors (slow!)',
     2484                'm: toggle multiplot','s: color scheme','f: select data' )
     2485        Page.keyPress = OnPlotKeyPress
    24732486    else:
    2474         Page.Choice = (' key press','l: offset left','r: offset right','d: offset down','u: offset up',
    2475             'o: reset offset','t: toggle legend','c: contour on','w: toggle waterfall colors (slow!)',
    2476             'm: toggle multiplot','s: color scheme','f: select data' )
    2477     Page.keyPress = OnPlotKeyPress
     2487        Page.Choice = ()
     2488        newPlot = True
    24782489    PatternId = G2frame.PatternId
    24792490    name = G2frame.PatternTree.GetItemText(PatternId)[4:]
    2480     Pattern = []   
    24812491    if G2frame.SinglePlot:
    2482         name = G2frame.PatternTree.GetItemText(PatternId)
    2483         name = plotType+name[4:]
    2484         Id = G2gd.GetPatternTreeItemId(G2frame,PatternId,name)
    2485         Pattern = G2frame.PatternTree.GetItemPyData(Id)
    2486         if Pattern:
    2487             Pattern.append(name)
    2488         PlotList = [Pattern,]
     2492        if 'G(R)' not in data:
     2493            return
     2494        PlotList = [data[plotType],]
    24892495    else:
    24902496        PlotList = []
     
    24952501        for item in choices:
    24962502            Pid = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,item)
    2497             name = plotType+item[4:]
    2498             Id = G2gd.GetPatternTreeItemId(G2frame,Pid,name)
     2503            Id = G2gd.GetPatternTreeItemId(G2frame,Pid,'PDF Controls')
    24992504            Pattern = G2frame.PatternTree.GetItemPyData(Id)
    25002505            if Pattern:
    2501                 Pattern.append(item)
    2502                 PlotList.append(Pattern)
     2506                PlotList.append(Pattern[plotType])
    25032507        name = plotType
    25042508    if plotType == 'G(R)':
     
    25152519    lenX = 0
    25162520    for Pattern in PlotList:
    2517         try:
    2518             xye = Pattern[1]
    2519         except IndexError:
    2520             return
     2521        xye = Pattern[1]
    25212522        Ymax = max(Ymax,max(xye[1]))
     2523    XYlist = []
    25222524    if G2frame.Contour:
    25232525        ContourZ = []
    25242526        ContourY = []
    25252527        Nseq = 0
    2526     else:
    2527         XYlist = []
    25282528    for N,Pattern in enumerate(PlotList):
    25292529        xye = Pattern[1]
     
    25312531        if not lenX:
    25322532            lenX = len(X)           
    2533         if G2frame.Contour and len(Pattern)>1:
     2533        if G2frame.Contour and len(PlotList)>1:
    25342534            Y = xye[1]
    25352535            if lenX == len(X):
     
    25472547#            else:
    25482548#                Plot.plot(X,Y,colors[N%6],picker=False)
    2549     if G2frame.Contour and len(Pattern)>1:
     2549    if G2frame.Contour and len(PlotList)>1:
    25502550        acolor = mpl.cm.get_cmap(G2frame.ContourColor)
    25512551        Img = Plot.imshow(ContourZ,cmap=acolor,vmin=Ymax*G2frame.Cmin,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate,
     
    25962596                line = mplC.LineCollection(XYlist,color=colors[0])
    25972597                Plot.add_collection(line)
     2598            if peaks != None:
     2599                Plot.axvline(peaks['Limits'][0],color='g',dashes=(5,5),picker=2.)
     2600                Plot.axvline(peaks['Limits'][1],color='r',dashes=(5,5),picker=2.)
    25982601        wx.EndBusyCursor()
    25992602        if plotType == 'G(R)':
  • trunk/GSASIIpwd.py

    r2652 r2659  
    580580   
    581581    sig = lambda Th,U,V,W: np.sqrt(max(0.001,U*tand(Th)**2+V*tand(Th)+W))
    582     sigTOF = lambda dsp,S0,S1,S2,Sq:  S0+S1*dsp**2+S2*dsp**4+Sq/dsp**2
     582    sigTOF = lambda dsp,S0,S1,S2,Sq: np.sqrt(S0+S1*dsp**2+S2*dsp**4+Sq/dsp**2)
    583583    gam = lambda Th,X,Y: (X/cosd(Th)+Y*tand(Th))
    584584    gamTOF = lambda dsp,X,Y: X*dsp+Y*dsp**2
     
    17681768            binsperFWHM.append(0.)
    17691769    if peakVary: PeaksPrint(dataType,parmDict,sigDict,varyList,binsperFWHM)
    1770     if len(binsperFWHM) and min(binsperFWHM) < 3.:
    1771         print '*** Warning: calculated peak widths are too narrow to refine profile coefficients ***'
    1772         if 'T' in Inst['Type'][0]:
    1773             print ' Manually increase sig-0, 1, or 2 in Instrument Parameters'
    1774         else:
    1775             print ' Manually increase W in Instrument Parameters'
     1770    if len(binsperFWHM):
     1771        if min(binsperFWHM) < 1.:
     1772            print '*** Warning: calculated peak widths are too narrow to refine profile coefficients ***'
     1773            if 'T' in Inst['Type'][0]:
     1774                print ' Manually increase sig-0, 1, or 2 in Instrument Parameters'
     1775            else:
     1776                print ' Manually increase W in Instrument Parameters'
     1777        elif min(binsperFWHM) < 4.:
     1778            print '*** Warning: data binning yields too few data points across peak FWHM for reliable Rietveld refinement ***'
     1779            print '*** recommended is 6-10; you have %.2f ***'%(min(binsperFWHM))
    17761780    return sigDict,result,sig,Rvals,varyList,parmDict,fullvaryList,badVary
    17771781
  • trunk/GSASIIpwdGUI.py

    r2657 r2659  
    782782        '''
    783783        event.Skip()
    784         r,c =  event.GetRow(),event.GetCol()
     784        c =  event.GetRow(),event.GetCol()[1]
    785785        if c < 0: # replot except whan a column is selected
    786786            wx.CallAfter(G2plt.PlotPatterns,G2frame,plotType='PWDR')
     
    48554855        dlg.Destroy()
    48564856        wx.CallAfter(UpdatePDFGrid,G2frame,data)
    4857         #UpdatePDFGrid(G2frame,data)
    48584857
    48594858    def OnOptimizePDF(event):
     
    49454944            data['Ruland'] = R/10.
    49464945            G2pwd.CalcPDF(data,inst,limits,xydata)
    4947 #            g = xydata['GofR'][1][1]
    4948 #            r = xydata['GofR'][1][0]
    4949 #            g0 = g[r < Data['Rmin']] + 4*np.pi*r[r < Data['Rmin']]*numbDen
    4950 #            G2plt.PlotXY(G2frame,[[r[r < Data['Rmin']], g0]],Title='G(r)+4pi*r',
    4951 #                         labelX=r'r, $\AA$',labelY=r'G(r)$+4\pi r$')           
    49524946        EvalLowPDF(GetCurrentVals())
    49534947        BkgMax = max(xydata['IofQ'][1][1])/50.
     
    49684962        inst = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,powId,'Instrument Parameters'))[0]
    49694963        auxPlot = G2pwd.CalcPDF(Data,inst,limits,xydata)
    4970         PDFId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'PDF '+powName[4:])
    4971         G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PDFId,'I(Q)'+powName[4:]),xydata['IofQ'])
    4972         G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PDFId,'S(Q)'+powName[4:]),xydata['SofQ'])
    4973         G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PDFId,'F(Q)'+powName[4:]),xydata['FofQ'])
    4974         G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PDFId,'G(R)'+powName[4:]),xydata['GofR'])
     4964        data['I(Q)'] = xydata['IofQ']
     4965        data['S(Q)'] = xydata['SofQ']
     4966        data['F(Q)'] = xydata['FofQ']
     4967        data['G(R)'] = xydata['GofR']
    49754968        return auxPlot
    49764969       
     
    49904983            G2plt.PlotXY(G2frame,[XY,],Title=plot[2])
    49914984        if event is not None:
    4992             G2plt.PlotISFG(G2frame,newPlot=True,plotType='I(Q)')
    4993             G2plt.PlotISFG(G2frame,newPlot=True,plotType='S(Q)')
    4994             G2plt.PlotISFG(G2frame,newPlot=True,plotType='F(Q)')
    4995             #G2plt.PlotISFG(G2frame,newPlot=True,plotType='G(R)')
    4996             G2plt.PlotISFG(G2frame,newPlot=False,plotType='G(R)')
     4985            G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='I(Q)')
     4986            G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='S(Q)')
     4987            G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='F(Q)')
     4988            G2plt.PlotISFG(G2frame,data,newPlot=False,plotType='G(R)')
    49974989        else:
    4998             G2plt.PlotISFG(G2frame,newPlot=False)
     4990            G2plt.PlotISFG(G2frame,data,newPlot=False)
    49994991       
    50004992    def OnComputeAllPDF(event):
     
    50575049        print(msg)
    50585050        # what item is being plotted? -- might be better to select from tree
    5059         G2plt.PlotISFG(G2frame,newPlot=True,plotType='I(Q)')
    5060         G2plt.PlotISFG(G2frame,newPlot=True,plotType='S(Q)')
    5061         G2plt.PlotISFG(G2frame,newPlot=True,plotType='F(Q)')
    5062         G2plt.PlotISFG(G2frame,newPlot=True,plotType='G(R)')
     5051        G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='I(Q)')
     5052        G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='S(Q)')
     5053        G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='F(Q)')
     5054        G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='G(R)')
    50635055
    50645056    # Routine UpdatePDFGrid starts here
     
    51115103    G2frame.dataFrame.Bind(wx.EVT_MENU, OnComputePDF, id=G2gd.wxID_PDFCOMPUTE)
    51125104    G2frame.dataFrame.Bind(wx.EVT_MENU, OnComputeAllPDF, id=G2gd.wxID_PDFCOMPUTEALL)
    5113 #    G2frame.dataFrame.Bind(wx.EVT_MENU, OnOptimizePDF, id=G2gd.wxID_PDFOPT)
    51145105    mainSizer = wx.BoxSizer(wx.VERTICAL)
    51155106
     
    52645255    Size = mainSizer.Fit(G2frame.dataFrame)
    52655256    G2frame.dataFrame.setSizePosLeft(Size)
    5266 #    G2frame.dataFrame.SendSizeEvent()  # for Mac, but not needed due to Bob's size+1 change in setSizePosLeft
     5257###############################################################################################################
     5258#UpdatePDFPeaks: peaks in G(r)
     5259###############################################################################################################
     5260def UpdatePDFPeaks(G2frame,peaks,data):
     5261
     5262
     5263    if G2frame.dataDisplay:
     5264        G2frame.dataFrame.Clear()
     5265    G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.PDFPksMenu)
     5266    if not G2frame.dataFrame.GetStatusBar():
     5267        Status = G2frame.dataFrame.CreateStatusBar()   
     5268    G2frame.dataDisplay = wx.Panel(G2frame.dataFrame)
     5269#    G2frame.dataFrame.Bind(wx.EVT_MENU, OnCopyPDFControls, id=G2gd.wxID_PDFCOPYCONTROLS)
     5270#    G2frame.dataFrame.Bind(wx.EVT_MENU, OnSavePDFControls, id=G2gd.wxID_PDFSAVECONTROLS)
     5271    mainSizer = wx.BoxSizer(wx.VERTICAL)
     5272    mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' PDF peaks: '),0,WACV)
     5273    mainSizer.Add((5,5),0)   
     5274
     5275
     5276
     5277    mainSizer.Layout()   
     5278    G2frame.dataDisplay.SetSizer(mainSizer)
     5279    Size = mainSizer.Fit(G2frame.dataFrame)
     5280    Size = (500,300)
     5281    G2frame.dataFrame.setSizePosLeft(Size)
     5282   
  • trunk/defaultIparms.py

    r2515 r2659  
    3434defaultIparm_lbl = []
    3535defaultIparms = []
    36 
     36''' the phrase 'lab data' in the following makes the default goniometer type='Bragg-Brentano'
     37    otherwise it is set to 'Debye-Scherrer'
     38'''
    3739defaultIparm_lbl.append('CuKa lab data')
    3840defaultIparms.append([
Note: See TracChangeset for help on using the changeset viewer.