Changeset 3909


Ignore:
Timestamp:
Apr 19, 2019 10:42:41 AM (4 years ago)
Author:
vondreele
Message:

Add new menu item to Map Peaks - Invert peak position; inverts map and then redoes the map search

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3898 r3909  
    56495649           
    56505650        # Phase / Map peaks tab
    5651         G2G.Define_wxId('wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR','wxID_PEAKSUNIQUE', 'wxID_PEAKSDELETE','wxID_PEAKSSAVE',
    5652             'wxID_PEAKSDA','wxID_PEAKSDISTVP', 'wxID_PEAKSVIEWPT', 'wxID_FINDEQVPEAKS', 'wxID_SHOWBONDS',)
     5651        G2G.Define_wxId('wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR','wxID_PEAKSUNIQUE', 'wxID_PEAKSDELETE','wxID_PEAKSSAVE','wxID_PEAKSDA',
     5652            'wxID_PEAKSDISTVP', 'wxID_PEAKSVIEWPT', 'wxID_FINDEQVPEAKS', 'wxID_SHOWBONDS','wxID_INVERTPEAKS',)
    56535653        self.MapPeaksMenu = wx.MenuBar()
    56545654        self.PrefillDataMenu(self.MapPeaksMenu)
     
    56625662        self.MapPeaksEdit.Append(G2G.wxID_PEAKSDA,'Calc dist/ang','Calculate distance or angle for selection')
    56635663        self.MapPeaksEdit.Append(G2G.wxID_FINDEQVPEAKS,'Equivalent peaks','Find equivalent peaks')
     5664        self.MapPeaksEdit.Append(G2G.wxID_INVERTPEAKS,'Invert peak positions','Inverts map & peak positions')
    56645665        self.MapPeaksEdit.Append(G2G.wxID_PEAKSUNIQUE,'Unique peaks','Select unique set')
    56655666        self.MapPeaksEdit.Append(G2G.wxID_PEAKSSAVE,'Save peaks','Save peaks to csv file')
  • trunk/GSASIIphsGUI.py

    r3908 r3909  
    90319031        G2plt.PlotStructure(G2frame,data)
    90329032       
     9033    def OnPeaksInvert(event):
     9034        if 'Map Peaks' in data:
     9035            generalData = data['General']
     9036            mapData = generalData['Map']
     9037            try:
     9038                mapData['rho'] = np.flip(mapData['rho'],(0,1,2))
     9039            except TypeError:
     9040                mapData['rho'] = np.flip(mapData['rho'],0)
     9041                mapData['rho'] = np.flip(mapData['rho'],1)
     9042                mapData['rho'] = np.flip(mapData['rho'],2)               
     9043            OnSearchMaps(event)
     9044        FillMapPeaksGrid()
     9045        G2plt.PlotStructure(G2frame,data)
     9046       
    90339047    def OnPeaksEquiv(event):
    90349048        if 'Map Peaks' in data:
     
    95479561        G2frame.Bind(wx.EVT_MENU, OnShowBonds, id=G2G.wxID_SHOWBONDS)
    95489562        G2frame.Bind(wx.EVT_MENU, OnPeaksEquiv, id=G2G.wxID_FINDEQVPEAKS)
     9563        G2frame.Bind(wx.EVT_MENU, OnPeaksInvert, id=G2G.wxID_INVERTPEAKS)
    95499564        G2frame.Bind(wx.EVT_MENU, OnPeaksUnique, id=G2G.wxID_PEAKSUNIQUE)
    95509565        G2frame.Bind(wx.EVT_MENU, OnPeaksSave, id=G2G.wxID_PEAKSSAVE)
  • trunk/GSASIIplot.py

    r3907 r3909  
    88008800                for plane in Planes:
    88018801                    RenderPlane(plane,color)
    8802         if drawingData['showSlice']:
     8802        if drawingData.get('showSlice',False):
    88038803            if len(D4mapData.get('rho',[])):        #preferentially select 4D map if there
    88048804                rho = D4mapData['rho'][:,:,:,int(G2frame.tau*10)]   #pick current tau 3D slice
Note: See TracChangeset for help on using the changeset viewer.