Changeset 4581 for trunk/GSASIIpwdGUI.py
- Timestamp:
- Oct 2, 2020 10:03:39 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwdGUI.py
r4578 r4581 3503 3503 3504 3504 def LoadUnitCell(event): 3505 '''Called in response to a Load Phase menu command''' 3505 3506 UnitCellsId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Unit Cells List') 3506 3507 data = G2frame.GPXtree.GetItemPyData(UnitCellsId) … … 3525 3526 wx.MessageBox('NB: Magnetic phases from mcif files are not suitable for this purpose,\n because of space group symbol - operators mismatches', 3526 3527 caption='No usable space groups',style=wx.ICON_EXCLAMATION) 3527 return 3528 pNum = G2G.ItemSelector(Phases,G2frame,'Select phase',header='Phase') 3528 return 3529 elif len(Phases) == 1: # don't ask questions when there is only 1 answer 3530 pNum = 0 3531 else: 3532 pNum = G2G.ItemSelector(Phases,G2frame,'Select phase',header='Phase') 3529 3533 if pNum is None: return 3530 3534 Phase = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,pId,Phases[pNum])) 3531 3535 Phase['magPhases'] = G2frame.GPXtree.GetItemText(G2frame.PatternId) #use as reference for recovering possible phases 3532 3536 Cell = Phase['General']['Cell'] 3533 SGData = Phase['General']['SGData']3537 SGData.update(Phase['General']['SGData']) 3534 3538 if 'SGGray' not in SGData: 3535 3539 SGData['SGGray'] = False 3536 3540 if Phase['General']['Type'] == 'nuclear' and 'MagSpGrp' in SGData: 3537 SGData = G2spc.SpcGroup(SGData['SpGrp'])[1]3541 SGData.update(G2spc.SpcGroup(SGData['SpGrp'])[1]) 3538 3542 G2frame.dataWindow.RunSubGroups.Enable(True) 3539 3543 ssopt.update({'Use':False,'ssSymb':'(abg)','ModVec':[0.1,0.1,0.1],'maxH':1}) … … 4204 4208 controls,bravais,cells,dminx,ssopt,magcells = G2frame.GPXtree.GetItemPyData(pUCid) 4205 4209 E,SGData = G2spc.SpcGroup(controls[13]) 4206 atoms = list(set([atom[1] for atom in controls[15]])) 4210 try: 4211 atoms = list(set([atom[1] for atom in controls[15]])) 4212 except: 4213 wx.MessageBox('Error: Problem with phase. Use Load Phase 1st.', 4214 caption='k-SUBGROUPSMAG setup error: Phase loaded?',style=wx.ICON_EXCLAMATION) 4215 return 4207 4216 testAtoms = ['',]+[atom for atom in atoms if len(G2elem.GetMFtable([atom,],[2.0,]))] 4208 4217 Kx = [' ','0','1/2','-1/2','1/3','-1/3','2/3','1']
Note: See TracChangeset
for help on using the changeset viewer.