Changeset 1787 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Apr 13, 2015 12:59:34 PM (7 years ago)
Author:
vondreele
Message:

remove user reject HKL selection from Reflection List
implement rule bases user reject for HKLF reflections in Controls
user rejection changes mul to -mul; reflection list shows this in red
implement tool tip on 3Dhkl plots showing hkl indices on each point encountered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1785 r1787  
    29472947        G2plt.Plot3DSngl(G2frame,newPlot=True,Data=controls,hklRef=refList,Title=phaseName)
    29482948       
    2949     def OnRejectHKL(event):
    2950         phaseName = G2frame.RefList
    2951         pId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Phases')
    2952         phaseId =  G2gd.GetPatternTreeItemId(G2frame,pId,phaseName)
    2953         General = G2frame.PatternTree.GetItemPyData(phaseId)['General']
    2954         im = General.get('Super',0)
    2955         rowList = G2frame.refTable[phaseName].GetSelectedRows()
    2956         for row in rowList:
    2957             data[1]['RefList'][row][3+im] *= -1 #toggles mul & -mul
    2958             if data[1]['RefList'][row][3+im] < 0:
    2959                 G2frame.refTable[phaseName].SetCellBackgroundColour(row,3+im,wx.RED)
    2960             else:
    2961                 G2frame.refTable[phaseName].SetCellBackgroundColour(row,3+im,wx.WHITE)
    2962         G2frame.refTable[phaseName].ClearSelection()
    2963         ShowReflTable(phaseName)
    2964        
    2965     def OnClearReject(event):
    2966         phaseName = G2frame.RefList
    2967         pId = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Phases')
    2968         phaseId =  G2gd.GetPatternTreeItemId(G2frame,pId,phaseName)
    2969         General = G2frame.PatternTree.GetItemPyData(phaseId)['General']
    2970         im = General.get('Super',0)
    2971         for row in range(G2frame.refTable[phaseName].GetNumberRows()):
    2972             if data[1]['RefList'][row][3+im] < 0:
    2973                 data[1]['RefList'][row][3+im] *= -1 #toggles mul & -mul
    2974                 G2frame.refTable[phaseName].SetCellBackgroundColour(row,3+im,wx.WHITE)
    2975         UpdateReflectionGrid(G2frame,data,True,Name)
    2976                    
    29772949    def MakeReflectionTable(phaseName):
    29782950        '''Returns a wx.grid table (G2gd.Table) containing a list of all reflections
     
    31263098        G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2gd.wxID_PWDHKLPLOT)
    31273099        G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2gd.wxID_PWD3DHKLPLOT)
    3128         G2frame.Bind(wx.EVT_MENU,OnRejectHKL, id=G2gd.wxID_REJECTHKL)
    3129         G2frame.Bind(wx.EVT_MENU,OnClearReject, id=G2gd.wxID_CLEARREJECT)
    31303100        G2frame.dataFrame.SelectPhase.Enable(False)
    31313101    else:
     
    31363106        G2frame.Bind(wx.EVT_MENU, OnPlotHKL, id=G2gd.wxID_PWDHKLPLOT)
    31373107        G2frame.Bind(wx.EVT_MENU, OnPlot3DHKL, id=G2gd.wxID_PWD3DHKLPLOT)
    3138         G2frame.dataFrame.RejectHKL.Enable(False)
    3139         G2frame.dataFrame.ClearReject.Enable(False)
    31403108        G2frame.dataFrame.SelectPhase.Enable(False)
    31413109           
Note: See TracChangeset for help on using the changeset viewer.