Changeset 2356 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Jul 1, 2016 11:52:49 AM (6 years ago)
Author:
vondreele
Message:

revision to RDF calculation/plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2355 r2356  
    6666            pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE)
    6767        self.panel = wx.Panel(self)         #just a dummy - gets destroyed in Draw!
    68         self.result = {'UseObsCalc':False,'maxR':10.0,'Smooth':'linear'}
     68        self.result = {'UseObsCalc':True,'maxR':20.0,'Smooth':'linear'}
    6969       
    7070        self.Draw()
     
    9393        mainSizer = wx.BoxSizer(wx.VERTICAL)
    9494        mainSizer.Add(wx.StaticText(self.panel,label='Background RDF controls:'),0,WACV)
    95         useOC = wx.CheckBox(self.panel,label=' Use obs && calc intensities?')
     95        useOC = wx.CheckBox(self.panel,label=' Use obs - calc intensities?')
    9696        useOC.SetValue(self.result['UseObsCalc'])
    9797        useOC.Bind(wx.EVT_CHECKBOX,OnUseOC)
     
    9999        dataSizer = wx.BoxSizer(wx.HORIZONTAL)
    100100        dataSizer.Add(wx.StaticText(self.panel,label=' Smoothing type: '),0,WACV)
    101         smChoice = ['linear','nearest','zero','slinear',]
     101        smChoice = ['linear','nearest',]
    102102        smCombo = wx.ComboBox(self.panel,value=self.result['Smooth'],choices=smChoice,
    103103            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    980980        finally:
    981981            dlg.Destroy()
    982         xydata = {}
    983982        PatternId = G2frame.PatternId       
    984983        background = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Background'))
     
    986985        inst,inst2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Instrument Parameters'))
    987986        pwddata = G2frame.PatternTree.GetItemPyData(PatternId)[1]
    988         auxPlot = G2pwd.MakeRDF(RDFcontrols,background,inst,pwddata,xydata)
     987        auxPlot = G2pwd.MakeRDF(RDFcontrols,background,inst,pwddata)
    989988#        GSASIIpath.IPyBreak()
    990989        superMinusOne = unichr(0xaf)+unichr(0xb9)
    991990        for plot in auxPlot:
    992991            XY = np.array(plot[:2])
    993             G2plt.PlotXY(G2frame,[XY,],Title=plot[2],labelX=r'$Q,\AA$'+superMinusOne,labelY=r'$I(Q)$')     
    994         G2plt.PlotXY(G2frame,xydata,Title='D(r)') 
    995        
     992            if plot[2] == 'D(R)':
     993                xlabel = r'$R, \AA$'
     994                ylabel = r'$D(R), arb. units$'
     995            else:
     996                xlabel = r'$Q,\AA$'+superMinusOne
     997                ylabel = r'$I(Q)$'
     998            G2plt.PlotXY(G2frame,[XY,],Title=plot[2],labelX=xlabel,labelY=ylabel,lines=True)     
    996999       
    9971000    def BackSizer():
     
    47954798        G2plt.PlotISFG(G2frame,newPlot=False)       
    47964799                       
    4797     def OnSinDamp(event):
    4798         data['sinDamp'] = sinDamp.GetValue()
    4799         auxPlot = ComputePDF(data)
    4800         G2plt.PlotISFG(G2frame,newPlot=False)       
    4801                        
    48024800    def OnPacking(event):
    48034801        try:
     
    49544952        Status.SetStatusText('PDF computed')
    49554953        for plot in auxPlot:
    4956             G2plt.PlotXY(G2frame,plot[:2],Title=plot[2])
     4954            XY = np.array(plot[:2])
     4955            G2plt.PlotXY(G2frame,[XY,],Title=plot[2])
    49574956       
    49584957        G2plt.PlotISFG(G2frame,newPlot=True,type='I(Q)')
     
    51125111    lorch.Bind(wx.EVT_CHECKBOX, OnLorch)
    51135112    sqBox.Add(lorch,0,WACV)
    5114 # this isn't the right thing but something is needed here - leave as place holder
    5115 #    sinDamp = wx.CheckBox(G2frame.dataDisplay,label='SinQ damping?')
    5116 #    sinDamp.SetValue(data['sinDamp'])
    5117 #    sinDamp.Bind(wx.EVT_CHECKBOX,OnSinDamp)
    5118 #    sqBox.Add(sinDamp,0,WACV)
    51195113    sqBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Scaling q-range: '),0,WACV)
    51205114    SQmin = wx.TextCtrl(G2frame.dataDisplay,value='%.1f'%(data['QScaleLim'][0]))
Note: See TracChangeset for help on using the changeset viewer.