Changeset 3585
- Timestamp:
- Sep 5, 2018 9:31:18 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r3571 r3585 2271 2271 if 'bool' in format: 2272 2272 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)) 2273 2282 else: 2274 2283 try: … … 2292 2301 valItem.Bind(wx.EVT_CHECKBOX,OnValItem) 2293 2302 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) 2294 2308 else: 2295 2309 valItem = wx.TextCtrl(self.panel,value=format%(value),style=wx.TE_PROCESS_ENTER) -
trunk/GSASIIlattice.py
r3583 r3585 420 420 SpGrp = G2spc.StandardizeSpcName(SpGp) 421 421 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])425 422 BNSlatt = phase['SGData']['SGLatt'] 426 423 if result[1]: 427 424 BNSlatt += '_'+result[1] 428 BNSsym = G2spc.GetGenSym(phase['SGData'])[2]425 phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData']) 429 426 phase['SGData']['BNSlattsym'] = [BNSlatt,BNSsym[BNSlatt]] 430 427 G2spc.ApplyBNSlatt(phase['SGData'],phase['SGData']['BNSlattsym']) 431 phase['SGData']['GenSym'],phase['SGData']['GenFlg'],BNSsym = G2spc.GetGenSym(phase['SGData'])432 428 phase['SGData']['MagSpGrp'] = G2spc.MagSGSym(phase['SGData']) 433 429 phase['SGData']['SpnFlp'] = G2spc.GenMagOps(phase['SGData'])[1] -
trunk/GSASIIphsGUI.py
r3579 r3585 2389 2389 else: 2390 2390 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) 2392 2392 detTrans = np.abs(nl.det(Trans)) 2393 2393 generalData = newPhase['General'] … … 2396 2396 Atoms = newPhase['Atoms'] 2397 2397 if ifMag: 2398 atMxyz = [] 2398 atMxyz = [] 2399 G2spc.ApplyBNSlatt(SGData,SGData['BNSlattsym']) 2399 2400 SGData['GenSym'],SGData['GenFlg'],BNSsym = G2spc.GetGenSym(SGData) 2400 2401 SGData['OprNames'],SGData['SpnFlp'] = G2spc.GenMagOps(SGData) … … 2404 2405 CSI = G2spc.GetCSpqinel(SGData['SpnFlp'],dupDir) 2405 2406 atMxyz.append(CSI[0]) 2406 print (atom[3:6],CSI)2407 2407 dlg = UseMagAtomDialog(G2frame,Atoms,atCodes,atMxyz) 2408 2408 try: … … 2462 2462 SGData = generalData['SGData'] 2463 2463 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) 2465 2465 Atoms = newPhase['Atoms'] 2466 2466 atMxyz = [] -
trunk/GSASIIpwdGUI.py
r3583 r3585 3079 3079 controls[5] = (SGData['SGLatt']+SGData['SGLaue']).replace('-','') 3080 3080 if controls[5][1:] == 'm3': controls[5] += 'm' 3081 if 'P3' in controls[5]: controls[5] = 'P6/mmm' 3081 3082 if 'R' in controls[5]: controls[5] = 'R3-H' 3082 3083 controls[6:13] = Cell[1:8] … … 3426 3427 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List')) 3427 3428 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']) 3431 3435 if dlg.ShowModal() == wx.ID_OK: 3432 3436 magcells = [] … … 3436 3440 Landau = newVals[4] 3437 3441 intermed = newVals[5] 3442 keepaxes = newVals[6] 3438 3443 wx.BeginBusyCursor() 3439 3444 MAXMAGN = kMAG.GetNonStdSubgroupsmag(SGData,kvec,star,Landau,intermed) … … 3446 3451 Trans = np.array([numbs[:3],numbs[4:7],numbs[8:11]]).T #Bilbao gives transpose 3447 3452 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) 3450 3457 if RVT is None: 3451 3458 magcells.append(phase) 3452 3459 else: 3453 #magcells.append(phase) #temporary??3460 magcells.append(phase) #temporary?? 3454 3461 Nresult,NUvec,NTrans = RVT 3455 3462 newphase = G2lat.makeBilbaoPhase(Nresult,NUvec,NTrans) -
trunk/GSASIIspc.py
r3583 r3585 591 591 txt = '' 592 592 for icen in cen: 593 if icen == 1: 594 txt += '1,' 595 continue 593 596 if not icen: 594 597 txt += '0,' … … 3621 3624 ''' 3622 3625 altSettingOrtho = { 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'}, 3623 3627 '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'}, 3625 3630 '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'}, 3626 3631 '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'}, 3627 3635 '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'}, 3628 3636 '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'}, … … 3647 3655 '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'}, 3648 3656 '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'}, 3649 3659 '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'}, 3650 3660 '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'}, … … 3667 3677 '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'}, 3668 3678 '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'}, 3669 3682 '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'}, 3670 3683 '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.