Changeset 4502 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Jun 20, 2020 4:08:34 PM (3 years ago)
Author:
vondreele
Message:

Eliminate the Hatom radius & moved Bond search factor to be under Bond radius slider.
Put the Plane stuff at the bottom.
Keep map peak positions visible in map when one is selected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4501 r4502  
    85178517                G2plt.PlotStructure(G2frame,data)
    85188518               
     8519            def OnRadFactor(invalid,value,tc):
     8520                FindBondsDraw(data)
     8521                G2plt.PlotStructure(G2frame,data)
     8522           
    85198523            slopSizer = wx.BoxSizer(wx.HORIZONTAL)
    85208524            slideSizer = wx.FlexGridSizer(0,2,0,0)
     
    85868590                slideSizer.Add(magMult,1,wx.EXPAND|wx.RIGHT)
    85878591                       
     8592            slideSizer.Add(wx.StaticText(drawOptions,-1,' Bond search factor: '),0,WACV)
     8593            slideSizer.Add(G2G.ValidatedTxtCtrl(drawOptions,drawingData,'radiusFactor',
     8594                nDig=(10,2),xmin=0.1,xmax=1.2,size=wx.Size(60,20),OnLeave=OnRadFactor),0,WACV)
     8595
    85888596            slopSizer.Add(slideSizer,1,wx.EXPAND|wx.RIGHT)
    85898597            slopSizer.Add((10,5),0)
     
    87858793           
    87868794            return showSizer
    8787            
    8788         def RadSizer():
    8789            
    8790             def OnSizeHatoms(invalid,value,tc):
     8795       
     8796        def MapSizer():
     8797           
     8798            def OnShowMap(event):
     8799                drawingData['showMap'] = showMap.GetValue()
    87918800                G2plt.PlotStructure(G2frame,data)
    87928801               
    8793             def OnRadFactor(invalid,value,tc):
    8794                 FindBondsDraw(data)
    8795                 G2plt.PlotStructure(G2frame,data)
    8796            
    8797             radSizer = wx.BoxSizer(wx.HORIZONTAL)
    8798             radSizer.Add(wx.StaticText(drawOptions,-1,' Hydrogen radius, A:  '),0,WACV)
    8799             sizeH = G2G.ValidatedTxtCtrl(drawOptions,drawingData,'sizeH',nDig=(10,2),xmin=0.1,xmax=1.2,size=wx.Size(60,20),OnLeave=OnSizeHatoms)
    8800             radSizer.Add(sizeH,0,WACV)
    8801    
    8802             radSizer.Add(wx.StaticText(drawOptions,-1,' Bond search factor:  '),0,WACV)
    8803             radFactor = G2G.ValidatedTxtCtrl(drawOptions,drawingData,'radiusFactor',nDig=(10,2),xmin=0.1,xmax=1.2,size=wx.Size(60,20),OnLeave=OnRadFactor)
    8804             radSizer.Add(radFactor,0,WACV)
    8805             return radSizer
     8802            mapSizer = wx.BoxSizer(wx.VERTICAL)
     8803            showMap = wx.CheckBox(drawOptions,-1,label=' Show density map?')
     8804            showMap.Bind(wx.EVT_CHECKBOX, OnShowMap)
     8805            showMap.SetValue(drawingData['showMap'])
     8806            mapSizer.Add(showMap,0,WACV)
     8807            mapSizer.Add(G2G.G2SliderWidget(drawOptions,drawingData,'contourLevel',
     8808                'Max relative to rho max ({:.2f}): '.format(generalData['Map']['rhoMax']),
     8809                0.01,1.0,100,onChange=G2plt.PlotStructure,onChangeArgs=(G2frame,data)))
     8810            mapSizer.Add(G2G.G2SliderWidget(drawOptions,drawingData,'mapSize',
     8811                'Range of map surrounding view point: ',0.1,10.,10.,
     8812                onChange=G2plt.PlotStructure,onChangeArgs=(G2frame,data)))
     8813            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
     8814            lineSizer.Add(wx.StaticText(drawOptions,wx.ID_ANY,'On map peak selection:  '),0,WACV)
     8815            lineSizer.Add(G2G.G2CheckBox(drawOptions,'Move view point',drawingData,'peakMoveView'))
     8816            mapSizer.Add(lineSizer,0,WACV)
     8817            mapSizer.Add(DistanceSettingSizer(drawingData,
     8818                'PeakDistRadius','atomsExpandRadius','atomsDistRadius'),0,wx.LEFT,20)
     8819            return mapSizer
    88068820           
    88078821        def PlaneSizer():
     
    89078921        G2G.HorizontalLine(mainSizer,drawOptions)
    89088922        mainSizer.Add(ShowSizer(),0,)
    8909         G2G.HorizontalLine(mainSizer,drawOptions)
    8910         mainSizer.Add(RadSizer(),0,)
     8923        if generalData['Map']['rhoMax'] and not generalData.get('4DmapData',{}):
     8924            G2G.HorizontalLine(mainSizer,drawOptions)
     8925            mainSizer.Add(MapSizer())
    89118926        G2G.HorizontalLine(mainSizer,drawOptions)
    89128927        mainSizer.Add(PlaneSizer(),0,)
    8913         if generalData['Map']['rhoMax'] and not generalData.get('4DmapData',{}):
    8914             G2G.HorizontalLine(mainSizer,drawOptions)
    8915             def OnShowMap(event):
    8916                 drawingData['showMap'] = showMap.GetValue()
    8917                 G2plt.PlotStructure(G2frame,data)
    8918             showMap = wx.CheckBox(drawOptions,-1,label=' Show density map?')
    8919             showMap.Bind(wx.EVT_CHECKBOX, OnShowMap)
    8920             showMap.SetValue(drawingData['showMap'])
    8921             mainSizer.Add(showMap,0,WACV)
    8922             mainSizer.Add(G2G.G2SliderWidget(drawOptions,
    8923                         drawingData,'contourLevel',
    8924                         'Max relative to rho max ({:.2f}): '
    8925                                         .format(generalData['Map']['rhoMax']),
    8926                         0.01,1.0,100,
    8927                         onChange=G2plt.PlotStructure,onChangeArgs=(G2frame,data)
    8928                         ))
    8929             mainSizer.Add(G2G.G2SliderWidget(drawOptions,
    8930                         drawingData,'mapSize',
    8931                         'Range of map surrounding view point: ',0.1,10.,10.,
    8932                         onChange=G2plt.PlotStructure,onChangeArgs=(G2frame,data)
    8933                         ))
    8934             mapSizer = wx.BoxSizer(wx.HORIZONTAL)
    8935             mapSizer.Add(wx.StaticText(drawOptions,wx.ID_ANY,'On map peak selection:  '),0,WACV)
    8936             mapSizer.Add(G2G.G2CheckBox(drawOptions,'Move view point',drawingData,'peakMoveView'))
    8937             mainSizer.Add(mapSizer)
    8938             mapSizer = DistanceSettingSizer(drawingData,
    8939                         'PeakDistRadius','atomsExpandRadius','atomsDistRadius')
    8940             mainSizer.Add(mapSizer,0,wx.LEFT,20)
    89418928
    89428929        SetPhaseWindow(drawOptions,mainSizer)
Note: See TracChangeset for help on using the changeset viewer.