Changeset 3681 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Oct 17, 2018 1:37:42 PM (3 years ago)
Author:
vondreele
Message:

change Panalytical importer to read multi xrdMeasurement blocks - can each have multiple scans; all recorded as separate PWDR histograms.
Begin implementation of access to Bilbao SUBGROUPS routine
some work on incommensurate magnetic structure stuff
Add new option for PWDR contour plots to show temperature on y-axis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3673 r3681  
    31173117            ssopt['SGData'] = SGData
    31183118        data = [controls,bravais,cells,dminx,ssopt,magcells]
     3119        G2frame.dataWindow.RunSubGroups.Enable(True)
    31193120        G2frame.GPXtree.SetItemPyData(UnitCellsId,data)
    31203121        OnHklShow(None)
     
    31623163            if not ssopt.get('Use',False):
    31633164                G2frame.dataWindow.RunSubGroupsMag.Enable(True)
     3165        G2frame.dataWindow.RunSubGroups.Enable(True)
    31643166        G2frame.GPXtree.SetItemPyData(UnitCellsId,data)
    31653167        G2frame.dataWindow.RefineCell.Enable(True)
     
    31873189        controls[13] = SGData['SpGrp']
    31883190#        G2frame.GPXtree.SetItemPyData(UnitCellsId,[controls,bravais,cells,dmin,ssopt])
     3191        G2frame.dataWindow.RunSubGroups.Enable(True)
    31893192        G2frame.dataWindow.RefineCell.Enable(True)
    31903193        OnHklShow(None)
     
    36273630            phase['Keep'] = False
    36283631        return uAtms
     3632
     3633    def OnRunSubs(event):
     3634#        import SUBGROUPS as kSUB
     3635        G2frame.dataWindow.RunSubGroupsMag.Enable(False)
     3636        pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List')
     3637        controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid)
     3638        E,SGData = G2spc.SpcGroup(controls[13])
     3639        kvec = ['0','0','0',' ',' ',' ',' ',' ',' ',' ']
     3640        Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1']
     3641        Ky = [' ','0','1/2','1/3','2/3','1']
     3642        Kz = [' ','0','1/2','3/2','1/3','2/3','1']
     3643        dlg = G2G.MultiDataDialog(G2frame,title='SUBGROUPS options',
     3644            prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.', \
     3645                     ' kx3 as fr.',' ky3 as fr.',' kz3 as fr.', \
     3646                     ' Use whole star',' Filter by','preserve axes','max unique'],
     3647            values=kvec[:9]+[False,'',True,100],
     3648            limits=[Kx[1:],Ky[1:],Kz[1:],Kx,Ky,Kz,Kx,Ky,Kz,[True,False],['',' Landau transition',' Only maximal subgroups',],
     3649                [True,False],[1,100]],
     3650            formats=['choice','choice','choice','choice','choice','choice','choice','choice','choice','bool','choice',
     3651                    'bool','%d',])
     3652        if dlg.ShowModal() == wx.ID_OK:
     3653            subcells = []
     3654            newVals = dlg.GetValues()
     3655            kvec[:9] = newVals[:9]
     3656            nkvec = kvec.index(' ')
     3657            star = newVals[9]
     3658            filterby = newVals[10]
     3659            keepaxes = newVals[11]
     3660            maxequiv = newVals[12]
     3661            if 'maximal' in filterby:
     3662                maximal = True
     3663                Landau = False
     3664            elif 'Landau' in filterby:
     3665                maximal = False
     3666                Landau = True
     3667            else:
     3668                maximal = False
     3669                Landau = False           
     3670            if nkvec not in [0,3,6,9]:
     3671                wx.MessageBox('Error: check your propagation vector(s)',
     3672                    caption='Bilbao SUBGROUPS setup error',style=wx.ICON_EXCLAMATION)
     3673                return
     3674            if nkvec in [6,9] and Landau:
     3675                wx.MessageBox('Error, multi k-vectors & Landau not compatible',
     3676                    caption='Bilbao SUBGROUPS setup error',style=wx.ICON_EXCLAMATION)
     3677                return
     3678        print('run Bilbao SUBGROUPS - TBD')
    36293679       
    36303680    def OnRunSubsMag(event):
    36313681        import kSUBGROUPSMAG as kMAG
     3682        G2frame.dataWindow.RunSubGroups.Enable(False)
    36323683        pUCid = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List')
    36333684        controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid)
     
    37313782    G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.IndexMenu)
    37323783    G2frame.Bind(wx.EVT_MENU, OnIndexPeaks, id=G2G.wxID_INDEXPEAKS)
     3784    G2frame.Bind(wx.EVT_MENU, OnRunSubs, id=G2G.wxID_RUNSUB)
    37333785    G2frame.Bind(wx.EVT_MENU, OnRunSubsMag, id=G2G.wxID_RUNSUBMAG)
    37343786    G2frame.Bind(wx.EVT_MENU, CopyUnitCell, id=G2G.wxID_COPYCELL)
Note: See TracChangeset for help on using the changeset viewer.