Changeset 2595


Ignore:
Timestamp:
Dec 19, 2016 2:52:33 PM (5 years ago)
Author:
vondreele
Message:

Add spinner to the Flat Bkg correction for PDF

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r2582 r2595  
    299299                data['Container Bkg.']['Add'])*data['Container Bkg.']['Mult']
    300300        IofQ[1][1] += xycontainer[Ibeg:Ifin]
     301    data['IofQmin'] = IofQ[1][1][Ifin-1]
    301302    IofQ[1][1] -= data.get('Flat Bkg',0.)
    302303    #get element data & absorption coeff.
     
    361362    xydata['GofR'] = copy.deepcopy(xydata['FofQ'])
    362363    nR = len(xydata['GofR'][1][1])
    363 #    mul = 12
    364364    mul = int(round(2.*np.pi*nR/(data.get('Rmax',100.)*qLimits[1])))
    365365    xydata['GofR'][1][0] = 2.*np.pi*np.linspace(0,nR,nR)/(mul*qLimits[1])
  • trunk/GSASIIpwdGUI.py

    r2587 r2595  
    46044604    if 'Flat Bkg' not in data:
    46054605        data['Flat Bkg'] = 0.
     4606    if 'IofQmin' not in data:
     4607        data['IofQmin'] = 1.0
    46064608   
    46074609    def FillFileSizer(fileSizer,key):
     
    46404642            typeHint=float,OnLeave=AfterChange)
    46414643        mulBox.Add(mult,0,)
    4642         multSpin = wx.SpinButton(G2frame.dataDisplay,style=wx.SP_VERTICAL,size=wx.Size(20,20))
     4644        multSpin = wx.SpinButton(G2frame.dataDisplay,style=wx.SP_VERTICAL,size=wx.Size(20,25))
    46434645        multSpin.SetRange(-1,1)
    46444646        multSpin.SetValue(0)
     
    46864688        wx.CallAfter(UpdatePDFGrid,G2frame,data)
    46874689        #UpdatePDFGrid(G2frame,data)
     4690        wx.CallAfter(OnComputePDF,None)
     4691       
     4692    def OnFlatSpin(event):
     4693        data['Flat Bkg'] += flatSpin.GetValue()*0.01*data['IofQmin']
     4694        flatBkg.SetValue(data['Flat Bkg'])
     4695        flatSpin.SetValue(0)       
    46884696        wx.CallAfter(OnComputePDF,None)
    46894697       
     
    49804988    flatBkg = G2G.ValidatedTxtCtrl(G2frame.dataDisplay,data,'Flat Bkg',nDig=(10,0),
    49814989            typeHint=float,OnLeave=AfterChangeNoRefresh)
    4982     sqBox.Add(flatBkg,0)   
     4990    sqBox.Add(flatBkg,0)
     4991    if data.get('IofQmin',0.):
     4992        flatSpin = wx.SpinButton(G2frame.dataDisplay,style=wx.SP_VERTICAL,size=wx.Size(20,25))
     4993        flatSpin.SetRange(-1,1)
     4994        flatSpin.SetValue(0)
     4995        flatSpin.Bind(wx.EVT_SPIN, OnFlatSpin)
     4996        sqBox.Add(flatSpin,0,WACV)
    49834997    mainSizer.Add(sqBox,0)
    49844998       
     
    50305044    sqBox.Add(noRing,0)
    50315045    mainSizer.Add(sqBox,0)
    5032     #Rmax
    50335046
    50345047    mainSizer.Layout()   
Note: See TracChangeset for help on using the changeset viewer.