Changeset 3616
- Timestamp:
- Sep 20, 2018 11:24:54 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r3613 r3616 2470 2470 for mid,magdata in enumerate(magData): 2471 2471 if magdata['Keep']: 2472 magdata['No.'] = mid 2472 2473 trans = G2spc.Trans2Text(magdata['Trans']) 2473 2474 vec = G2spc.Latt2text([magdata['Uvec'],]) 2474 2475 magKeep.append(magdata) 2475 2476 magIds.append(mid) 2476 magchoices.append(' %s; (%s) + (%s)'%(magdata['Name'],trans,vec))2477 magchoices.append('(%d) %s; (%s) + (%s)'%(mid,magdata['Name'],trans,vec)) 2477 2478 if not len(magKeep): 2478 2479 G2frame.ErrorDialog('Magnetic phase selection error','No magnetic phases found; be sure to "Keep" some') … … 2484 2485 magchoice = magKeep[sel] 2485 2486 magId = magIds[sel] 2486 phaseName = '%s mag_%d'%(data['General']['Name'], sel)2487 phaseName = '%s mag_%d'%(data['General']['Name'],magchoice['No.']) 2487 2488 newPhase = copy.deepcopy(data) 2488 2489 newPhase['ranId'] = ran.randint(0,sys.maxsize), -
trunk/GSASIIpwdGUI.py
r3608 r3616 3123 3123 def LoadUnitCell(event): 3124 3124 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(UnitCellsId) 3125 controls = controls[:14]+[['0','0','0',' ',' ',' '],[],] 3126 data = controls,bravais,cells,dminx,ssopt,magcells 3127 G2frame.GPXtree.SetItemPyData(UnitCellsId,data) 3125 3128 pId = G2gd.GetGPXtreeItemId(G2frame,G2frame.root, 'Phases') 3126 3129 if not pId: return … … 3156 3159 if len(G2elem.GetMFtable([atom[ct],],[2.0,])): 3157 3160 testAtoms.append(atom[:cx+3]) 3158 controls .append(testAtoms)3161 controls[15] = testAtoms 3159 3162 G2frame.dataWindow.RunSubGroupsMag.Enable(True) 3160 3163 G2frame.dataWindow.RefineCell.Enable(True) … … 3501 3504 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List')) 3502 3505 E,SGData = G2spc.SpcGroup(controls[13]) 3503 if len(controls) > 14: 3504 testAtoms = ['',]+list(set([atom[1] for atom in controls[14]])) 3505 kvec = ['0','0','0',' ',' ',' '] 3506 Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1'] 3507 Ky = [' ','0','1/2','1/3','2/3','1'] 3508 Kz = [' ','0','1/2','3/2','1/3','2/3','1'] 3506 testAtoms = ['',]+list(set([atom[1] for atom in controls[15]])) 3507 kvec = ['0','0','0','0','0','0'] 3508 Kx = ['0','1/2','-1/2','1/3','-1/3','2/3','1'] 3509 Ky = ['0','1/2','1/3','2/3','1'] 3510 Kz = ['0','1/2','3/2','1/3','2/3','1'] 3509 3511 dlg = G2G.MultiDataDialog(G2frame,title='k-SUBGROUPSMAG options', 3510 3512 prompts=[' kx1 as fr.',' ky1 as fr.',' kz1 as fr.',' kx2 as fr.',' ky2 as fr.',' kz2 as fr.',\ … … 3524 3526 atype = newVals[10] 3525 3527 allmom = newVals[11] 3526 magAtms = [atom for atom in controls[1 4] if atom[1] == atype]3528 magAtms = [atom for atom in controls[15] if atom[1] == atype] 3527 3529 wx.BeginBusyCursor() 3528 3530 wx.MessageBox(''' For use of k-SUBGROUPSMAG, please cite: … … 3541 3543 caption='Bilbao k-SUBGROUPSMAG error',style=wx.ICON_EXCLAMATION) 3542 3544 return 3545 controls[14] = kvec 3543 3546 for result in MAXMAGN: 3544 3547 if result[0].strip().endswith("1'"): #skip gray groups … … 3860 3863 if 'N' in Inst['Type'][0]: 3861 3864 G2frame.dataWindow.RunSubGroupsMag.Enable(True) 3862 mainSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label='\n Magnetic cells from Bilbao k-SUBGROUPSMAG:'),0,WACV) 3865 3866 Label = '\n Magnetic cells from Bilbao k-SUBGROUPSMAG for %s; kvec1: (%s), kvec2: (%s):'%(SGData['SpGrp'],''.join(controls[14][:3]),''.join(controls[14][3:])) 3867 mainSizer.Add(wx.StaticText(parent=G2frame.dataWindow,label=Label),0,WACV) 3863 3868 rowLabels = [] 3869 for i in range(len(magcells)): rowLabels.append(str(i+1)) 3864 3870 colLabels = ['Space Gp.','Try','Keep','Trans','Vec','a','b','c','alpha','beta','gamma','Volume'] 3865 3871 Types = [wg.GRID_VALUE_STRING,wg.GRID_VALUE_BOOL,wg.GRID_VALUE_BOOL,wg.GRID_VALUE_STRING,wg.GRID_VALUE_STRING,]+ \ … … 3867 3873 table = [] 3868 3874 for phase in magcells: 3869 rowLabels.append('')3870 3875 cell = list(phase['Cell']) 3871 3876 trans = G2spc.Trans2Text(phase['Trans']) … … 3877 3882 magDisplay.SetTable(MagCellsTable, True) 3878 3883 magDisplay.Bind(wg.EVT_GRID_CELL_LEFT_CLICK,RefreshMagCellsGrid) 3879 magDisplay.SetRowLabelSize(0)3880 3884 magDisplay.AutoSizeColumns(False) 3881 3885 for r in range(magDisplay.GetNumberRows()): -
trunk/GSASIIspc.py
r3591 r3616 1118 1118 1119 1119 def getlattSym(Trans): 1120 Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb' }1120 Fives = {'ababc':'abc','bcbca':'cba','acacb':'acb','cabab':'cab'} 1121 1121 transText = Trans2Text(Trans) 1122 1122 lattSym = ''
Note: See TracChangeset
for help on using the changeset viewer.