Changeset 4507


Ignore:
Timestamp:
Jun 22, 2020 7:55:35 PM (3 years ago)
Author:
vondreele
Message:

alow plotting of non integer HKL planes
make planes partially transparent so one can see what's behind.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4505 r4507  
    24042404            pawleySizer.Add(wx.StaticText(General,label=' Pawley neg. wt.: '),0,WACV)
    24052405            pawlNegWt = G2G.ValidatedTxtCtrl(General,generalData,'Pawley neg wt',size=(65,25),
    2406                 xmin=0.,xmax=1.,nDig=(10,4))
     2406                xmin=0.,xmax=1.,nDig=(10,3,'g'))
    24072407            pawleySizer.Add(pawlNegWt,0,WACV)
    24082408            return pawleySizer
     
    87878787            showSizer.Add(line3Sizer)
    87888788           
    8789            
    87908789            if generalData['Map']['rhoMax']:
    87918790                line3Sizer = wx.BoxSizer(wx.HORIZONTAL)
     
    88378836                vals = plane.GetValue().split()
    88388837                try:
    8839                     hkl = [int(vals[i]) for i in range(3)]
    8840                     if not np.any(np.array(hkl)):       #can't be all zeros!
     8838                    hkl = [float(vals[i]) for i in range(3)]
     8839                    if not any(hkl):       #can't be all zeros!
    88418840                        raise ValueError
    88428841                except (ValueError,IndexError):
    88438842                    hkl = drawingData['Plane'][0]
    88448843                drawingData['Plane'][0] = hkl
    8845                 plane.SetValue('%3d %3d %3d'%(hkl[0],hkl[1],hkl[2]))
     8844                plane.SetValue('%5.3f %5.3f %5.3f'%(hkl[0],hkl[1],hkl[2]))
    88468845                G2plt.PlotStructure(G2frame,data)
    88478846               
     
    88658864            planeSizer1.Add(wx.StaticText(drawOptions,label=' Plane: '),0,WACV)
    88668865            H = drawingData['Plane'][0]
    8867 #            Zstep = G2G.ValidatedTxtCtrl(drawOptions,drawingData,'Zstep',nDig=(10,2),xmin=0.01,xmax=4.0)
    8868             plane = wx.TextCtrl(drawOptions,value='%3d %3d %3d'%(H[0],H[1],H[2]),
     8866            plane = wx.TextCtrl(drawOptions,value='%5.3f %5.3f %5.3f'%(H[0],H[1],H[2]),
    88698867                style=wx.TE_PROCESS_ENTER)
    88708868            plane.Bind(wx.EVT_TEXT_ENTER,OnPlane)
  • trunk/GSASIIplot.py

    r4502 r4507  
    90659065        GL.glTranslate(-Tx,-Ty,-Tz)
    90669066        drawingData['modelView'] = GL.glGetDoublev(GL.GL_MODELVIEW_MATRIX)
    9067         if drawingData['unitCellBox']:
    9068             RenderBox()
    9069             if drawingData['Plane'][1]:
    9070                 H,phase,stack,phase,color = drawingData['Plane']
    9071                 Planes = G2lat.PlaneIntercepts(Amat,H,phase,stack)
    9072                 for plane in Planes:
    9073                     RenderPlane(plane,color)
     9067        # if drawingData['unitCellBox']:
     9068        #     if drawingData['Plane'][1]:
     9069        #         H,phase,stack,phase,color = drawingData['Plane']
     9070        #         Planes = G2lat.PlaneIntercepts(Amat,H,phase,stack)
     9071        #         for plane in Planes:
     9072        #             RenderPlane(plane,color)
     9073        #     RenderBox()
    90749074        if drawingData['showABC']:
    90759075            x,y,z = drawingData['viewPoint'][0]
     
    92579257            for x,y,z in drawingData['Voids']:
    92589258                RenderFadeSphere(x,y,z,.05,(0.,0.,1.))
     9259        if drawingData['unitCellBox']:
     9260            RenderBox()
     9261            if drawingData['Plane'][1]:
     9262                H,phase,stack,phase,color = drawingData['Plane']
     9263                Planes = G2lat.PlaneIntercepts(Amat,H,phase,stack)
     9264                for plane in Planes:
     9265                    RenderPlane(plane,color)
    92599266        if drawingData.get('showSlice',False):      #must be done last to properly show things behind as faded
    92609267            global contourSet,Zslice
Note: See TracChangeset for help on using the changeset viewer.