Changeset 3296


Ignore:
Timestamp:
Feb 22, 2018 1:16:19 PM (5 years ago)
Author:
vondreele
Message:

add selection for mustain, size & 3D pole distribution projections

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r3242 r3296  
    7171            h,k,l = hkl
    7272            Obj.SetValue('%3d %3d %3d'%(h,k,l))
     73            G2plt.PlotSizeStrainPO(G2frame,data,G2frame.hist)
     74           
     75        def OnProj(event):
     76            Obj = event.GetEventObject()
     77            generalData['3Dproj'] = Obj.GetValue()
    7378            G2plt.PlotSizeStrainPO(G2frame,data,G2frame.hist)
    7479       
     
    8994            POhklSizer.Add(poAxis,0,WACV)
    9095            plotSizer.Add(POhklSizer)
    91         elif generalData['Data plot type'] == 'Inv. pole figure':
    92             pass    #might need something here?     
     96        elif generalData['Data plot type'] in ['Mustrain','Size']:
     97            projSizer = wx.BoxSizer(wx.HORIZONTAL)
     98            projSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Show projections for: '),0,WACV)
     99            proj = ['','x','y','z','xy','xz','yz','xyz']
     100            projType = wx.ComboBox(DData,wx.ID_ANY,value=generalData['3Dproj'],choices=proj,
     101                style=wx.CB_READONLY|wx.CB_DROPDOWN)
     102            projType.Bind(wx.EVT_COMBOBOX, OnProj)
     103            projSizer.Add(projType,0,WACV)
     104            plotSizer.Add(projSizer)           
    93105        return plotSizer
    94106       
  • trunk/GSASIIphsGUI.py

    r3295 r3296  
    11531153        if 'Pawley neg wt' not in generalData:
    11541154            generalData['Pawley neg wt'] = 0.0
     1155        if '3Dproj' not in generalData:
     1156            generalData['3Dproj'] = ''
    11551157        if 'Algolrithm' in generalData.get('MCSA controls',{}) or \
    11561158            'MCSA controls' not in generalData:
     
    63006302            shToler = G2G.ValidatedTxtCtrl(Texture,Penalty,1,nDig=(10,2),min=0.001)
    63016303            shPenalty.Add(shToler,0,WACV)
    6302             return shPenalty   
     6304            return shPenalty
     6305       
     6306        def OnProj(event):
     6307            Obj = event.GetEventObject()
     6308            generalData['3Dproj'] = Obj.GetValue()
     6309            wx.CallAfter(G2plt.PlotTexture,G2frame,data)           
    63036310       
    63046311        # UpdateTexture executable starts here
     
    63946401            else:
    63956402                PTSizer.Add((0,5),0)
     6403        elif '3D' in textureData['PlotType']:
     6404            PTSizer.Add(wx.StaticText(Texture,-1,' Show projections for: '),0,WACV)
     6405            proj = ['','x','y','z','xy','xz','yz','xyz']
     6406            projType = wx.ComboBox(Texture,wx.ID_ANY,value=generalData['3Dproj'],choices=proj,
     6407                style=wx.CB_READONLY|wx.CB_DROPDOWN)
     6408            projType.Bind(wx.EVT_COMBOBOX, OnProj)
     6409            PTSizer.Add(projType,0,WACV)
     6410            PTSizer.Add((0,5),0)
     6411           
    63966412        if textureData['PlotType'] in ['Pole figure','Axial pole distribution','3D pole distribution']:
    63976413            PTSizer.Add(wx.StaticText(Texture,-1,' Pole figure HKL: '),0,WACV)
  • trunk/GSASIIplot.py

    r3295 r3296  
    40394039            xyzlim = np.array([Plot.get_xlim3d(),Plot.get_ylim3d(),Plot.get_zlim3d()]).T
    40404040            XYZlim = [min(xyzlim[0]),max(xyzlim[1])]
    4041             Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0])
    4042             Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1])
    4043             Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0])
     4041            if 'x' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0])
     4042            if 'y' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1])
     4043            if 'z' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0])
    40444044            Plot.set_xlim3d(XYZlim)
    40454045            Plot.set_ylim3d(XYZlim)
     
    43084308                xyzlim = np.array([Plot.get_xlim3d(),Plot.get_ylim3d(),Plot.get_zlim3d()]).T
    43094309                XYZlim = [min(xyzlim[0]),max(xyzlim[1])]
    4310                 Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0])
    4311                 Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1])
    4312                 Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0])
     4310                if 'x' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='x',offset=XYZlim[0])
     4311                if 'y' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='y',offset=XYZlim[1])
     4312                if 'z' in generalData['3Dproj']: Plot.contour(X,Y,Z,10,zdir='z',offset=XYZlim[0])
    43134313                Plot.set_xlim3d(XYZlim)
    43144314                Plot.set_ylim3d(XYZlim)
Note: See TracChangeset for help on using the changeset viewer.