Changeset 3842


Ignore:
Timestamp:
Mar 7, 2019 2:15:49 PM (3 years ago)
Author:
vondreele
Message:

force number of integration bins to be divisible by 4 - solves crash problem from fortran histogram routine

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r3841 r3842  
    961961    LRazm = np.array(data['LRazimuth'],dtype=np.float64)
    962962    numAzms = data['outAzimuths']
    963     numChans = data['outChannels']
     963    numChans = (data['outChannels']//4)*4
    964964    Dazm = (LRazm[1]-LRazm[0])/numAzms
    965965    if '2-theta' in data.get('binType','2-theta'):
  • trunk/GSASIIimgGUI.py

    r3841 r3842  
    894894        def OnNumOutAzms(invalid,value,tc):
    895895            wx.CallAfter(G2plt.PlotExposedImage,G2frame,event=tc.event)
     896           
     897        def OnNumOutBins(invalid,value,tc):
     898            data['outChannels'] = (data['outChannels']//4)*4
     899            outChan.SetValue(data['outChannels'])
    896900       
    897901        def OnOblique(event):
     
    979983        dataSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=' No. 2-theta/azimuth bins'),0,WACV)
    980984        littleSizer = wx.BoxSizer(wx.HORIZONTAL)
    981         outChan = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data,'outChannels',typeHint=int,min=10)
     985        outChan = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data,'outChannels',typeHint=int,min=10,OnLeave=OnNumOutBins)
    982986        littleSizer.Add(outChan,0,WACV)
    983987        outAzim = G2G.ValidatedTxtCtrl(G2frame.dataWindow,data,'outAzimuths',nDig=(10,4),min=1,typeHint=int,OnLeave=OnNumOutAzms)
Note: See TracChangeset for help on using the changeset viewer.