Changeset 1548 for trunk/GSASIIphsGUI.py
- Timestamp:
- Oct 30, 2014 4:07:50 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r1547 r1548 238 238 239 239 def OnSpaceGroup(event): 240 SpcGp = SGTxt.GetValue() 241 SGErr,SGData = G2spc.SpcGroup(SpcGp) 240 Flds = SGTxt.GetValue().split() 241 #get rid of extra spaces between fields first 242 for fld in Flds: fld = fld.strip() 243 SpcGp = ' '.join(Flds) 242 244 # try a lookup on the user-supplied name 243 if SGErr:244 SpGrpNorm = G2spc.StandardizeSpcName(SpcGp)245 if SpGrpNorm:246 E,SGData = G2spc.SpcGroup(SpGrpNorm)247 if not E: SGErr = False245 SpGrpNorm = G2spc.StandardizeSpcName(SpcGp) 246 if SpGrpNorm: 247 SGErr,SGData = G2spc.SpcGroup(SpGrpNorm) 248 else: 249 SGErr,SGData = G2spc.SpcGroup(SpcGp) 248 250 if SGErr: 249 251 text = [G2spc.SGErrors(SGErr)+'\nSpace Group set to previous'] … … 256 258 text,table = G2spc.SGPrint(SGData) 257 259 generalData['SGData'] = SGData 260 SGTxt.SetValue(generalData['SGData']['SpGrp']) 258 261 msg = 'Space Group Information' 259 262 G2gd.SGMessageBox(General,msg,text,table).Show() … … 536 539 if SSGData: 537 540 Vec = generalData['SuperVec'][0][0] #(3+1) only 538 generalData['SuperVec'][0][0] = G2spc.SSGModCheck(Vec,SSGData) 541 modSymb = SSGData['modSymb'] 542 generalData['SuperVec'][0][0] = G2spc.SSGModCheck(Vec,modSymb)[0] 539 543 text,table = G2spc.SSGPrint(generalData['SGData'],SSGData) 540 544 generalData['SSGData'] = SSGData … … 601 605 modSizer.Add(dimSizer) 602 606 vecSizer = wx.FlexGridSizer(1,5,5,5) 603 indChoice = [' 0','1','2','3','4','5','6','7']607 indChoice = ['1','2','3','4','5','6','7'] 604 608 for i in range(int(generalData['Super'])): 605 609 vecSizer.Add(wx.StaticText(General,label=' Modulation vector #%d: '%(i+1)),0,WACV) 606 vec = generalData['SuperVec'][i][0] 610 vec = generalData['SuperVec'][i][0] #these need to conform to the fixed modulations, e.g. 1/2 1/2 g 607 611 Vec = wx.TextCtrl(General,size=wx.Size(120,24), 608 612 value=' %.3f %.3f %.3f '%(vec[0],vec[1],vec[2]), … … 620 624 Max = wx.ComboBox(General,-1,value='%d'%(generalData['SuperVec'][i][2]),choices=indChoice, 621 625 style=wx.CB_READONLY|wx.CB_DROPDOWN) 622 Max.Bind(wx.EVT_TEXT_ENTER,OnMax) 623 Max.Bind(wx.EVT_KILL_FOCUS,OnMax) 626 Max.Bind(wx.EVT_COMBOBOX,OnMax) 624 627 vecSizer.Add(Max,0,WACV) 625 628 Indx[Max.GetId()] = i
Note: See TracChangeset
for help on using the changeset viewer.