Changeset 1830


Ignore:
Timestamp:
May 1, 2015 10:30:34 AM (8 years ago)
Author:
vondreele
Message:

change ftol on texture refinement - stop on real convergence
improve spacing for texture display
remove up/down buttons from Ddata display; do set focus back to this window when up/down arrows used to scan thru data

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r1828 r1830  
    789789    def OnSelect(event):
    790790        G2frame.hist = keyList[select.GetSelection()]
    791         selSpin.SetValue(keyList.index(G2frame.hist))
     791        oldFocus = wx.Window.FindFocus()
    792792        G2plt.PlotSizeStrainPO(G2frame,data,G2frame.hist)
     793        oldFocus.SetFocus()
    793794        wx.CallLater(100,RepaintHistogramInfo)
    794795       
    795     def OnSelSpin(event):
    796         G2frame.hist = keyList[selSpin.GetValue()]
    797         selSpin.SetValue(keyList.index(G2frame.hist))
    798         select.SetSelection(keyList.index(G2frame.hist))
    799         select.SetFirstItem(keyList.index(G2frame.hist))
    800         G2plt.PlotSizeStrainPO(G2frame,data,G2frame.hist)
    801         wx.CallLater(100,RepaintHistogramInfo)
    802        
    803796    def RepaintHistogramInfo():
    804797        G2frame.bottomSizer.DeleteWindows()
     
    921914        return bottomSizer
    922915               
    923     #DData.DestroyChildren() # bad, deletes scrollbars on Mac!
    924916    if DData.GetSizer():
    925917        DData.GetSizer().Clear(True)
     
    928920    if G2frame.hist != '':
    929921        topSizer = wx.FlexGridSizer(1,2,5,5)
    930         selSizer = wx.BoxSizer(wx.HORIZONTAL)   
    931         selSpin = wx.SpinButton(DData,size=(20,120),style=wx.SP_VERTICAL|wx.SP_WRAP)
    932         selSpin.SetValue(keyList.index(G2frame.hist))
    933         selSpin.SetRange(0,len(keyList)-1)
    934         selSpin.Bind(wx.EVT_SPIN,OnSelSpin)
    935         selSizer.Add(selSpin)
    936922        select = wx.ListBox(DData,choices=keyList,style=wx.LB_SINGLE,size=(-1,120))
    937923        select.SetSelection(keyList.index(G2frame.hist))
    938924        select.SetFirstItem(keyList.index(G2frame.hist))
    939925        select.Bind(wx.EVT_LISTBOX,OnSelect)
    940         selSizer.Add(select,0,WACV)
    941         topSizer.Add(selSizer)
     926        topSizer.Add(select,0,WACV|wx.LEFT,5)
    942927        if PWDR:
    943928            topSizer.Add(PlotSizer())
  • trunk/GSASIImath.py

    r1806 r1830  
    17241724        begin = time.time()
    17251725        values =  np.array(Dict2Values(parmDict, varyList))
    1726         result = so.leastsq(errSpHarm,values,Dfun=dervSpHarm,full_output=True,
     1726        result = so.leastsq(errSpHarm,values,Dfun=dervSpHarm,full_output=True,ftol=1.e-6,
    17271727            args=(SGData,cell,Gangls,Texture['Model'],refData,parmDict,varyList,pgbar))
    17281728        ncyc = int(result[2]['nfev']/2)
  • trunk/GSASIIphsGUI.py

    r1828 r1830  
    36413641        mainSizer = wx.BoxSizer(wx.VERTICAL)
    36423642        titleSizer = wx.BoxSizer(wx.HORIZONTAL)
    3643         titleSizer.Add(wx.StaticText(Texture,-1,'Spherical harmonics texture data for '+PhaseName+':'),0,WACV)
     3643        titleSizer.Add(wx.StaticText(Texture,-1,' Spherical harmonics texture data for '+PhaseName+':'),0,WACV)
    36443644        titleSizer.Add(wx.StaticText(Texture,-1,
    36453645            ' Texture Index J = %7.3f'%(G2lat.textureIndex(textureData['SH Coeff'][1]))),
     
    36483648        mainSizer.Add((0,5),0)
    36493649        shSizer = wx.FlexGridSizer(0,6,5,5)
    3650         shSizer.Add(wx.StaticText(Texture,-1,'Texture model: '),0,WACV)
     3650        shSizer.Add(wx.StaticText(Texture,-1,' Texture model: '),0,WACV)
    36513651        shModel = wx.ComboBox(Texture,-1,value=textureData['Model'],choices=shModels,
    36523652            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    37033703        mainSizer.Add((0,5),0)
    37043704        if textureData['SHShow']:
    3705             mainSizer.Add(wx.StaticText(Texture,-1,'Spherical harmonic coefficients: '),0,WACV)
     3705            mainSizer.Add(wx.StaticText(Texture,-1,' Spherical harmonic coefficients: '),0,WACV)
    37063706            mainSizer.Add((0,5),0)
    37073707            ODFSizer = wx.FlexGridSizer(0,8,2,2)
     
    37193719            mainSizer.Add((0,5),0)
    37203720        mainSizer.Add((0,5),0)
    3721         mainSizer.Add(wx.StaticText(Texture,-1,'Sample orientation angle zeros: '),0,WACV)
     3721        mainSizer.Add(wx.StaticText(Texture,-1,' Sample orientation angle zeros: '),0,WACV)
    37223722        mainSizer.Add((0,5),0)
    37233723        angSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    37343734            angVal.Bind(wx.EVT_TEXT_ENTER,OnAngValue)
    37353735            angVal.Bind(wx.EVT_KILL_FOCUS,OnAngValue)
    3736             angSizer.Add(angVal,0,WACV)
    3737             angSizer.Add((5,0),0)
    3738         mainSizer.Add(angSizer,0,WACV)
     3736            angSizer.Add(angVal,0,WACV|wx.LEFT,5)
     3737        mainSizer.Add(angSizer,0,WACV|wx.LEFT,5)
    37393738        SetPhaseWindow(G2frame.dataFrame,Texture,mainSizer)
    37403739
Note: See TracChangeset for help on using the changeset viewer.