Changeset 4502
- Timestamp:
- Jun 20, 2020 4:08:34 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4501 r4502 8517 8517 G2plt.PlotStructure(G2frame,data) 8518 8518 8519 def OnRadFactor(invalid,value,tc): 8520 FindBondsDraw(data) 8521 G2plt.PlotStructure(G2frame,data) 8522 8519 8523 slopSizer = wx.BoxSizer(wx.HORIZONTAL) 8520 8524 slideSizer = wx.FlexGridSizer(0,2,0,0) … … 8586 8590 slideSizer.Add(magMult,1,wx.EXPAND|wx.RIGHT) 8587 8591 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 8588 8596 slopSizer.Add(slideSizer,1,wx.EXPAND|wx.RIGHT) 8589 8597 slopSizer.Add((10,5),0) … … 8785 8793 8786 8794 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() 8791 8800 G2plt.PlotStructure(G2frame,data) 8792 8801 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 8806 8820 8807 8821 def PlaneSizer(): … … 8907 8921 G2G.HorizontalLine(mainSizer,drawOptions) 8908 8922 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()) 8911 8926 G2G.HorizontalLine(mainSizer,drawOptions) 8912 8927 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)8941 8928 8942 8929 SetPhaseWindow(drawOptions,mainSizer) -
trunk/GSASIIplot.py
r4501 r4502 9219 9219 if atomsExpandRadius > 0: 9220 9220 distances2Atoms(x,y,z,atomsExpandRadius,atomsdistRadius,Amat,matRot) 9221 elif len(mapPeaks):9221 if len(mapPeaks): 9222 9222 XYZ = mapPeaks.T[1:4].T 9223 9223 mapBonds = FindPeaksBonds(XYZ)
Note: See TracChangeset
for help on using the changeset viewer.