Changeset 2595 for trunk/GSASIIpwdGUI.py


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

Add spinner to the Flat Bkg correction for PDF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.