Changeset 3900 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Apr 15, 2019 4:15:37 PM (3 years ago)
Author:
vondreele
Message:

cursor now reports position/density on contour slice. Contour control has slide bar for setting max; renames the other contour slide bar as Rho max for the green density point plots
contours grid set to match map grid resolution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3897 r3900  
    51935193            'backColor':[0,0,0],'depthFog':False,'Zclip':50.0,'cameraPos':50.,'Zstep':0.5,
    51945194            'radiusFactor':0.85,'contourLevel':1.,'bondRadius':0.1,'ballScale':0.33,
    5195             'vdwScale':0.67,'ellipseProb':50,'sizeH':0.50,'unitCellBox':True,
     5195            'vdwScale':0.67,'ellipseProb':50,'sizeH':0.50,'unitCellBox':True,'contourMax':1.0,
    51965196            'showABC':True,'selectedAtoms':[],'Atoms':[],'oldxy':[],'magMult':1.0,
    51975197            'bondList':{},'viewDir':[1,0,0],'Plane':[[0,0,1],False,False,0.0,[255,255,0]]}
     
    52125212        if 'contourLevel' not in drawingData:
    52135213            drawingData['contourLevel'] = 1.
     5214        if 'contourMax' not in drawingData:
     5215            drawingData['contourMax'] = 1.
    52145216        if 'viewDir' not in drawingData:
    52155217            drawingData['viewDir'] = [0,0,1]
     
    61306132            def OnContourLevel(event):
    61316133                drawingData['contourLevel'] = contourLevel.GetValue()/100.
    6132                 contourLevelTxt.SetLabel(' Contour level: '+'%.2f'%(drawingData['contourLevel']*generalData['Map']['rhoMax']))
     6134                contourLevelTxt.SetLabel(' Rho maximum: '+'%.2f'%(drawingData['contourLevel']*generalData['Map']['rhoMax']))
    61336135                G2plt.PlotStructure(G2frame,data)
    61346136
     
    62096211           
    62106212            if generalData['Map']['rhoMax']:
    6211                 contourLevelTxt = wx.StaticText(drawOptions,-1,' Contour level: '+'%.2f'%(drawingData['contourLevel']*generalData['Map']['rhoMax']))
     6213                contourLevelTxt = wx.StaticText(drawOptions,-1,' Rho maximum: '+'%.2f'%(drawingData['contourLevel']*generalData['Map']['rhoMax']))
    62126214                slideSizer.Add(contourLevelTxt,0,WACV)
    62136215                contourLevel = wx.Slider(drawOptions,style=wx.SL_HORIZONTAL,value=int(100*drawingData['contourLevel']))
     
    62566258                G2plt.PlotStructure(G2frame,data)
    62576259               
     6260            def OnContourMax(event):
     6261                drawingData['contourMax'] = contourMax.GetValue()/100.
     6262                contourMaxTxt.SetLabel(' Max.: '+'%.2f'%(drawingData['contourMax']*generalData['Map']['rhoMax']))
     6263                G2plt.PlotStructure(G2frame,data)
     6264
    62586265            def OnViewPoint(event):
    62596266                event.Skip()
     
    63456352            showSizer.Add(line2Sizer)
    63466353           
    6347             if generalData['Map']['rhoMax'] and drawingData['unitCellBox']:
     6354            if generalData['Map']['rhoMax']:
    63486355                line3Sizer = wx.BoxSizer(wx.HORIZONTAL)
    63496356           
     
    63526359                showCS.SetValue(drawingData['showSlice'])           
    63536360                line3Sizer.Add(showCS,0,WACV)
     6361                contourMaxTxt = wx.StaticText(drawOptions,-1,' Max.: '+'%.2f'%(drawingData['contourMax']*generalData['Map']['rhoMax']))
     6362                line3Sizer.Add(contourMaxTxt,0,WACV)
     6363                contourMax = wx.Slider(drawOptions,style=wx.SL_HORIZONTAL,size=(150,25),value=int(100*drawingData['contourMax']))
     6364                contourMax.SetRange(1,100)
     6365                contourMax.Bind(wx.EVT_SLIDER, OnContourMax)
     6366                line3Sizer.Add(contourMax,1,wx.EXPAND|wx.RIGHT)
    63546367               
    63556368                showSizer.Add(line3Sizer)
Note: See TracChangeset for help on using the changeset viewer.