Changeset 1548 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Oct 30, 2014 4:07:50 PM (8 years ago)
Author:
vondreele
Message:

more super structure stuff - now some in unit cell indexing
now using pulldown ComboBoxes? for supersymmetry choices
continue building tables of supersymmetry codes
use deepcopy for peaks in various places; copy wasn't enough
get seq. peak fit to stop when a refinement goes bad; then allow display of results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r1547 r1548  
    238238               
    239239            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)
    242244                # 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 = False
     245                SpGrpNorm = G2spc.StandardizeSpcName(SpcGp)
     246                if SpGrpNorm:
     247                    SGErr,SGData = G2spc.SpcGroup(SpGrpNorm)
     248                else:
     249                    SGErr,SGData = G2spc.SpcGroup(SpcGp)
    248250                if SGErr:
    249251                    text = [G2spc.SGErrors(SGErr)+'\nSpace Group set to previous']
     
    256258                    text,table = G2spc.SGPrint(SGData)
    257259                    generalData['SGData'] = SGData
     260                    SGTxt.SetValue(generalData['SGData']['SpGrp'])
    258261                    msg = 'Space Group Information'
    259262                    G2gd.SGMessageBox(General,msg,text,table).Show()
     
    536539                if SSGData:
    537540                    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]
    539543                    text,table = G2spc.SSGPrint(generalData['SGData'],SSGData)
    540544                    generalData['SSGData'] = SSGData
     
    601605            modSizer.Add(dimSizer)
    602606            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']
    604608            for i in range(int(generalData['Super'])):
    605609                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
    607611                Vec = wx.TextCtrl(General,size=wx.Size(120,24),
    608612                    value=' %.3f %.3f %.3f '%(vec[0],vec[1],vec[2]),
     
    620624                Max = wx.ComboBox(General,-1,value='%d'%(generalData['SuperVec'][i][2]),choices=indChoice,
    621625                    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)       
    624627                vecSizer.Add(Max,0,WACV)
    625628                Indx[Max.GetId()] = i
Note: See TracChangeset for help on using the changeset viewer.