Changeset 3683 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Oct 18, 2018 4:25:25 PM (3 years ago)
Author:
vondreele
Message:

refactor MultiDataDialog? so it can show a line of multiple choice (or bool) entries in a row
use for run k-SUBGROUPSMAG - much nicer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3681 r3683  
    36853685        E,SGData = G2spc.SpcGroup(controls[13])
    36863686        testAtoms = ['',]+list(set([atom[1] for atom in controls[15]]))
    3687         kvec = ['0','0','0',' ',' ',' ',' ',' ',' ',' ']
    36883687        Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1']
    36893688        Ky = [' ','0','1/2','1/3','2/3','1']
    36903689        Kz = [' ','0','1/2','3/2','1/3','2/3','1']
    3691         dlg = G2G.MultiDataDialog(G2frame,title='k-SUBGROUPSMAG options',
    3692             prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.', \
    3693                      ' kx3 as fr.',' ky3 as fr.',' kz3 as fr.', \
    3694                      ' Use whole star',' Filter by','preserve axes', \
    3695                      'test for mag. atoms','all have moment','max unique'],
    3696             values=kvec[:9]+[False,'',True,'',False,100],
    3697             limits=[Kx[1:],Ky[1:],Kz[1:],Kx,Ky,Kz,Kx,Ky,Kz,[True,False],['',' Landau transition',' Only maximal subgroups',],
     3690        kvec = [['0','0','0'],[' ',' ',' '],[' ',' ',' ',' ']]
     3691        dlg = G2G.MultiDataDialog(G2frame,title='k-SUBGROUPSMAG options',prompts=[' k-vector1',' k-vector2',' k-vector3', \
     3692            ' Use whole star',' Filter by','preserve axes','test for mag. atoms','all have moment','max unique'],
     3693            values=kvec+[False,'',True,'',False,100],
     3694            limits=[[Kx[1:],Ky[1:],Kz[1:]],[Kx,Ky,Kz],[Kx,Ky,Kz],[True,False],['',' Landau transition',' Only maximal subgroups',],
    36983695                [True,False],testAtoms,[True,False],[1,100]],
    3699             formats=['choice','choice','choice','choice','choice','choice','choice','choice','choice','bool','choice',
     3696            formats=[['choice','choice','choice'],['choice','choice','choice'],['choice','choice','choice'],'bool','choice',
    37003697                    'bool','choice','bool','%d',])
    37013698        if dlg.ShowModal() == wx.ID_OK:
    37023699            magcells = []
    37033700            newVals = dlg.GetValues()
    3704             kvec[:9] = newVals[:9]
     3701            kvec[:9] = newVals[0]+newVals[1]+newVals[2]
    37053702            nkvec = kvec.index(' ')
    3706             star = newVals[9]
    3707             filterby = newVals[10]
    3708             keepaxes = newVals[11]
    3709             atype = newVals[12]
    3710             allmom = newVals[13]
    3711             maxequiv = newVals[14]
     3703            star = newVals[3]
     3704            filterby = newVals[4]
     3705            keepaxes = newVals[5]
     3706            atype = newVals[6]
     3707            allmom = newVals[7]
     3708            maxequiv = newVals[8]
    37123709            if 'maximal' in filterby:
    37133710                maximal = True
Note: See TracChangeset for help on using the changeset viewer.