Changeset 4568


Ignore:
Timestamp:
Sep 12, 2020 9:49:04 AM (3 years ago)
Author:
vondreele
Message:

cleanup of RollMap? command

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4564 r4568  
    53975397       
    53985398#        G2G.Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
    5399 
     5399##### GSAS-II Menu items
    54005400        # Main menu
    54015401        G2frame = self.GetTopLevelParent()
     
    62206220        self.MapPeaksEdit.Append(G2G.wxID_FINDEQVPEAKS,'Equivalent peaks','Find equivalent peaks')
    62216221        self.MapPeaksEdit.Append(G2G.wxID_INVERTPEAKS,'Invert peak positions','Inverts map & peak positions')
    6222         self.MapPeaksEdit.Append(G2G.wxID_ROLLMAP,'Roll map','Roll map by specified steps')
     6222        self.MapPeaksEdit.Append(G2G.wxID_ROLLMAP,'Roll charge flip map','Roll charge flip map by specified steps')
    62236223        self.MapPeaksEdit.Append(G2G.wxID_PEAKSUNIQUE,'Unique peaks','Select unique set')
    62246224        self.MapPeaksEdit.Append(G2G.wxID_PEAKSSAVE,'Save peaks','Save peaks to csv file')
  • trunk/GSASIIphsGUI.py

    r4564 r4568  
    58275827    def OnStopRMC(event):
    58285828        if G2frame.RMCchoice == 'fullrmc':
    5829             RMCPdict = data['RMC']['fullrmc']
    58305829            generalData = data['General']
    58315830            pName = G2frame.GSASprojectfile.split('.')[0] + '-' + generalData['Name']
     
    1194811947    def OnRollMap(event):
    1194911948        if 'Map Peaks' in data:
    11950             if mapData['Flip'] != True:
    11951                 print('Only valid for charge flip maps')
    11952                 return
     11949            half = np.array([.5,.5,.5])
    1195311950            mapPeaks = data['Map Peaks']
    1195411951            generalData = data['General']
     11952            mapData = generalData['Map']
     11953            if mapData['Flip'] != True:
     11954                wx.MessageBox('Only valid for charge flip maps',caption='Roll map error',style=wx.ICON_EXCLAMATION)
     11955                return
    1195511956            Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])           
    11956             mapData = generalData['Map']
    1195711957            dims = mapData['rho'].shape
    1195811958            dims = [[-D,D] for D in dims]
     
    1197211972                    peak[1:4] %= 1.
    1197311973                    peak[4] = np.sqrt(np.sum(np.inner(Amat,peak[1:4])**2))
     11974                    if len(peak)>4:
     11975                        peak[5] = np.sqrt(np.sum(np.inner(Amat,(peak[1:4]-half)%1.)**2))
    1197411976                FillMapPeaksGrid()
    1197511977                G2plt.PlotStructure(G2frame,data)
Note: See TracChangeset for help on using the changeset viewer.