Changeset 3585


Ignore:
Timestamp:
Sep 5, 2018 9:31:18 AM (5 years ago)
Author:
vondreele
Message:

change Bilbao dialog to use fractions for kx,ky,kz (not decimals) - Modify MultiFloatDialog? to allow strings
fix transform matrix issues - test with trigonal passes
fill in missing space groups in altSettingOrtho (e.g. P 2 2 2)
fix application of BNS centering on transform & Bilbao selection

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3571 r3585  
    22712271            if 'bool' in format:
    22722272                self.values[id] = Obj.GetValue()
     2273            elif 'str' in format:
     2274                try:
     2275                    val = Obj.GetValue()
     2276                    if val not in limits:
     2277                        raise ValueError
     2278                except ValueError:
     2279                    val = self.values[id]
     2280                self.values[id] = val
     2281                Obj.SetValue('%s'%(val))
    22732282            else:
    22742283                try:
     
    22922301                valItem.Bind(wx.EVT_CHECKBOX,OnValItem)
    22932302                valItem.SetValue(value)
     2303            elif 'str' in format:
     2304                valItem = wx.TextCtrl(self.panel,value='%s'%(value),style=wx.TE_PROCESS_ENTER)
     2305                valItem.Bind(wx.EVT_TEXT_ENTER,OnValItem)
     2306                valItem.Bind(wx.EVT_KILL_FOCUS,OnValItem)
     2307                valItem.SetValue('%s'%value)
    22942308            else:
    22952309                valItem = wx.TextCtrl(self.panel,value=format%(value),style=wx.TE_PROCESS_ENTER)
  • trunk/GSASIIlattice.py

    r3583 r3585  
    420420    SpGrp = G2spc.StandardizeSpcName(SpGp)
    421421    phase['SGData'] = G2spc.SpcGroup(SpGrp)[1]
    422     phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
    423     phase['SGData']['MagSpGrp'] = G2spc.MagSGSym(phase['SGData'])
    424     phase['SGData']['SGSpin'] = G2spc.GetSGSpin(phase['SGData'],result[0])
    425422    BNSlatt = phase['SGData']['SGLatt']
    426423    if result[1]:
    427424        BNSlatt += '_'+result[1]
    428         BNSsym = G2spc.GetGenSym(phase['SGData'])[2]
     425        phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
    429426        phase['SGData']['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]]
    430427        G2spc.ApplyBNSlatt(phase['SGData'],phase['SGData']['BNSlattsym']) 
    431     phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])
    432428    phase['SGData']['MagSpGrp'] = G2spc.MagSGSym(phase['SGData'])
    433429    phase['SGData']['SpnFlp'] = G2spc.GenMagOps(phase['SGData'])[1]
  • trunk/GSASIIphsGUI.py

    r3579 r3585  
    23892389            else:
    23902390                phaseName = newPhase['General']['Name']
    2391                 newPhase,atCodes = G2lat.TransformPhase(data,newPhase,Trans,Uvec,Vvec,ifMag)
     2391                newPhase,atCodes = G2lat.TransformPhase(data,newPhase,Trans.T,Uvec,Vvec,ifMag)
    23922392                detTrans = np.abs(nl.det(Trans))
    23932393                generalData = newPhase['General']
     
    23962396                Atoms = newPhase['Atoms']
    23972397                if ifMag:
    2398                     atMxyz = []
     2398                    atMxyz = []                   
     2399                    G2spc.ApplyBNSlatt(SGData,SGData['BNSlattsym'])
    23992400                    SGData['GenSym'],SGData['GenFlg'],BNSsym = G2spc.GetGenSym(SGData)
    24002401                    SGData['OprNames'],SGData['SpnFlp'] = G2spc.GenMagOps(SGData)
     
    24042405                        CSI = G2spc.GetCSpqinel(SGData['SpnFlp'],dupDir)
    24052406                        atMxyz.append(CSI[0])
    2406                         print (atom[3:6],CSI)
    24072407                    dlg = UseMagAtomDialog(G2frame,Atoms,atCodes,atMxyz)
    24082408                    try:
     
    24622462            SGData = generalData['SGData']
    24632463            vvec = np.array([0.,0.,0.])
    2464             newPhase,atCodes = G2lat.TransformPhase(data,newPhase,magchoice['Trans'],magchoice['Uvec'],vvec,True)
     2464            newPhase,atCodes = G2lat.TransformPhase(data,newPhase,magchoice['Trans'].T,magchoice['Uvec'],vvec,True)
    24652465            Atoms = newPhase['Atoms']
    24662466            atMxyz = []
  • trunk/GSASIIpwdGUI.py

    r3583 r3585  
    30793079        controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','')
    30803080        if controls[5][1:] == 'm3': controls[5] += 'm'
     3081        if 'P3' in controls[5]: controls[5] = 'P6/mmm'
    30813082        if 'R' in controls[5]: controls[5] = 'R3-H'
    30823083        controls[6:13] = Cell[1:8]
     
    34263427        controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List'))
    34273428        E,SGData = G2spc.SpcGroup(controls[13])
    3428         kvec = [0.,0.,0.]
    3429         dlg = G2G.MultiFloatDialog(G2frame,title='k-SUBGROUPSMAG options',prompts=[' kx',' ky',' kz',' Use whole star',' Landau transition',' Give intermediate cells'],
    3430                 values=kvec+[False,False,False],limits=[[0.,1.],[0.,1.],[0.,1.],[True,False],[True,False],[True,False]],formats=['%4.1f','%4.1f','%4.1f','bool','bool','bool'])
     3429        kvec = ['0','0','0']
     3430        dlg = G2G.MultiFloatDialog(G2frame,title='k-SUBGROUPSMAG options',
     3431            prompts=[' kx as fr.',' ky as fr.',' kz as fr.',' Use whole star',' Landau transition',' Give intermediate cells','preserve axes'],
     3432            values=kvec+[False,False,False,True],
     3433            limits=[['0','1/2','1/3','1/4'],['0','1/2','1/3','1/4'],['0','1/2','1/3','1/4'],[True,False],[True,False],[True,False],[True,False]],
     3434            formats=['str','str','str','bool','bool','bool','bool'])
    34313435        if dlg.ShowModal() == wx.ID_OK:
    34323436            magcells = []
     
    34363440            Landau = newVals[4]
    34373441            intermed = newVals[5]
     3442            keepaxes = newVals[6]
    34383443            wx.BeginBusyCursor()
    34393444            MAXMAGN = kMAG.GetNonStdSubgroupsmag(SGData,kvec,star,Landau,intermed)
     
    34463451                Trans = np.array([numbs[:3],numbs[4:7],numbs[8:11]]).T         #Bilbao gives transpose
    34473452                phase = G2lat.makeBilbaoPhase(result[:2],Uvec,Trans)
    3448                 phase['Cell'] = G2lat.TransformCell(controls[6:12],Trans)   
    3449                 RVT = G2lat.FindNonstandard(phase)
     3453                phase['Cell'] = G2lat.TransformCell(controls[6:12],Trans)
     3454                RVT = None
     3455                if keepaxes:
     3456                    RVT = G2lat.FindNonstandard(phase)
    34503457                if RVT is None:
    34513458                    magcells.append(phase)
    34523459                else:
    3453 #                    magcells.append(phase)          #temporary??
     3460                    magcells.append(phase)          #temporary??
    34543461                    Nresult,NUvec,NTrans = RVT
    34553462                    newphase = G2lat.makeBilbaoPhase(Nresult,NUvec,NTrans)
  • trunk/GSASIIspc.py

    r3583 r3585  
    591591        txt = ''
    592592        for icen in cen:
     593            if icen == 1:
     594                txt += '1,'
     595                continue
    593596            if not icen:
    594597                txt += '0,'
     
    36213624'''
    36223625altSettingOrtho = {
     3626        'P 2 2 2' :{'abc':'P 2 2 2','cab':'P 2 2 2','bca':'P 2 2 2','acb':'P 2 2 2','bac':'P 2 2 2','cba':'P 2 2 2'},
    36233627        'P 2 2 21' :{'abc':'P 2 2 21','cab':'P 21 2 2','bca':'P 2 21 2','acb':'P 2 21 2','bac':'P 2 2 21','cba':'P 21 2 2'},
    3624         'P 21 21 2':{'abc':'P 2121 2','cab':'P 2 21 21','bca':'P 21 2 21','acb':'P 21 2 21','bac':'P 21 21 2','cba':'P 2 21 21'},
     3628        'P 21 21 2':{'abc':'P 21 21 2','cab':'P 2 21 21','bca':'P 21 2 21','acb':'P 21 2 21','bac':'P 21 21 2','cba':'P 2 21 21'},
     3629        'P 21 21 21':{'abc':'P 21 21 21','cab':'P 21 21 21','bca':'P 21 21 21','acb':'P 21 21 21','bac':'P 21 21 21','cba':'P 21 21 21'},
    36253630        'C 2 2 21':{'abc':'C 2 2 21','cab':'A 21 2 2','bca':'B 2 21 2','acb':'B 2 21 2','bac':'C 2 2 21','cba':'A 21 2 2'},
    36263631        'C 2 2 2':{'abc':'C 2 2 2','cab':'A 2 2 2','bca':'B 2 2 2','acb':'B 2 2 2','bac':'C 2 2 2','cba':'A 2 2 2'},
     3632        'F 2 2 2':{'abc':'F 2 2 2','cab':'F 2 2 2','bca':'F 2 2 2','acb':'F 2 2 2','bac':'F 2 2 2','cba':'F 2 2 2'},
     3633        'I 2 2 2':{'abc':'I 2 2 2','cab':'I 2 2 2','bca':'I 2 2 2','acb':'I 2 2 2','bac':'I 2 2 2','cba':'I 2 2 2'},
     3634        'I 21 21 21':{'abc':'I 21 21 21','cab':'I 21 21 21','bca':'I 21 21 21','acb':'I 21 21 21','bac':'I 21 21 21','cba':'I 21 21 21'},
    36273635        'P m m 2':{'abc':'P m m 2','cab':'P 2 m m','bca':'P m 2 m','acb':'P m 2 m','bac':'P m m 2','cba':'P 2 m m'},
    36283636        'P m c 21':{'abc':'P m c 21','cab':'P 21 m a','bca':'P b 21 m','acb':'P m 21 b','bac':'P c m 21','cba':'P 21 a m'},
     
    36473655        'I b a 2':{'abc':'I b a 2','cab':'I 2 c b','bca':'I c 2 a','acb':'I c 2 a','bac':'I b a 2','cba':'I 2 c b'},
    36483656        'I m a 2':{'abc':'I m a 2','cab':'I 2 m b','bca':'I c 2 m','acb':'I m 2 a','bac':'I b m 2','cba':'I 2 c m'},
     3657        'P m m m':{'abc':'P m m m','cab':'P m m m','bca':'P m m m','acb':'P m m m','bac':'P m m m','cba':'P m m m'},
     3658        'P n n n':{'abc':'P n n n','cab':'P n n n','bca':'P n n n','acb':'P n n n','bac':'P n n n','cba':'P n n n'},
    36493659        'P c c m':{'abc':'P c c m','cab':'P m a a','bca':'P b m b','acb':'P b m b','bac':'P c c m','cba':'P m a a'},
    36503660        'P b a n':{'abc':'P b a n','cab':'P n c b','bca':'P c n a','acb':'P c n a','bac':'P b a n','cba':'P n c b'},
     
    36673677        'C m m a':{'abc':'C m m a','cab':'A b m m','bca':'B m c m','acb':'B m a m','bac':'C m m b','cba':'A c m m'},
    36683678        'C c c a':{'abc':'C c a a','cab':'A b a a','bca':'B b c b','acb':'B b a b','bac':'C c c b','cba':'A c a a'},
     3679        'F m m m':{'abc':'F m m m','cab':'F m m m','bca':'F m m m','acb':'F m m m','bac':'F m m m','cba':'F m m m'},
     3680        'F d d d':{'abc':'F d d d','cab':'F d d d','bca':'F d d d','acb':'F d d d','bac':'F d d d','cba':'F d d d'},
     3681        'I m m m':{'abc':'I m m m','cab':'I m m m','bca':'I m m m','acb':'I m m m','bac':'I m m m','cba':'I m m m'},
    36693682        'I b a m':{'abc':'I b a m','cab':'I m c b','bca':'I c m a','acb':'I c m a','bac':'I b a m','cba':'I m c b'},
    36703683        'I b c a':{'abc':'I b c a','cab':'I b c a','bca':'I b c a','acb':'I c a b','bac':'I c a b','cba':'I c a b'},
Note: See TracChangeset for help on using the changeset viewer.