Changeset 3503 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Jul 23, 2018 7:31:35 PM (4 years ago)
Author:
vondreele
Message:

add possibility of transforming test cell in Unit cell list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3496 r3503  
    4747import GSASIIplot as G2plt
    4848import GSASIIdataGUI as G2gd
     49import GSASIIphsGUI as G2phsG
    4950import GSASIIctrlGUI as G2G
    5051import GSASIIElemGUI as G2elemGUI
     
    33263327            SGData['SpnFlp'],False).Show()
    33273328       
     3329    def TransposeUnitCell(event):
     3330        Trans = np.eye(3)
     3331        Uvec = np.zeros(3)
     3332        Vvec = np.zeros(3)
     3333        ifMag = False
     3334        Type = 'nuclear'
     3335        newSpGrp = ''
     3336        BNSlatt = ''
     3337        phase = {'General':{'Name':'','Type':Type,'Cell':['',]+controls[6:13],'SGData':SGData}}
     3338        dlg = G2phsG.TransformDialog(G2frame,phase,Trans,Uvec,Vvec,ifMag,newSpGrp,BNSlatt)
     3339        try:
     3340            if dlg.ShowModal() == wx.ID_OK:
     3341                newPhase,Trans,Uvec,Vvec,ifMag,ifConstr,Common = dlg.GetSelection()
     3342                sgData = newPhase['General']['SGData']
     3343                controls[5] = sgData['SGLatt']+sgData['SGLaue']
     3344                controls[13] = sgData['SpGrp']
     3345                ssopt['SGData'] = G2spc.SpcGroup(controls[13])[1]
     3346                controls[6:13] = newPhase['General']['Cell'][1:8]
     3347            else:
     3348                return
     3349        finally:
     3350            dlg.Destroy()
     3351        wx.CallAfter(UpdateUnitCellsGrid,G2frame,data)
     3352       
    33283353    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndexMenu)
    33293354    G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2G.wxID_INDEXPEAKS)
     
    33313356    G2frame.Bind(wx.EVT_MENU, LoadUnitCell, id=G2G.wxID_LOADCELL)
    33323357    G2frame.Bind(wx.EVT_MENU, ImportUnitCell, id=G2G.wxID_IMPORTCELL)
     3358    G2frame.Bind(wx.EVT_MENU, TransposeUnitCell, id=G2G.wxID_TRANSPOSECELL)
    33333359    G2frame.Bind(wx.EVT_MENU, RefineCell, id=G2G.wxID_REFINECELL)
    33343360    G2frame.Bind(wx.EVT_MENU, MakeNewPhase, id=G2G.wxID_MAKENEWPHASE)
Note: See TracChangeset for help on using the changeset viewer.