Changeset 3257 for trunk/testSSymbols.py


Ignore:
Timestamp:
Feb 3, 2018 2:49:45 PM (4 years ago)
Author:
vondreele
Message:

fixes to incommensurate space group symbol handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testSSymbols.py

    r3234 r3257  
    8686        def OnSuperGp(event):
    8787            SSymbol = superGp.GetValue()
     88            SpGrp = Data['SGData']['SpGrp']
     89            if Data['SGData']['SGGray']: SpGrp += " 1'"
    8890            print('Try: %s%s'%(Data['SGData']['SpGrp'],SSymbol))
     91            if Data['SGData']['SGGray']: SSymbol = SSymbol[:-1]
    8992            E,SSGData = G2spc.SSpcGroup(Data['SGData'],SSymbol)
    9093            if SSGData:
     
    115118        mainSizer = wx.FlexGridSizer(0,2,5,5)
    116119        mainSizer.Add(wx.StaticText(self.testSSPanel,-1,'  Space group: '),0,WACV)
    117         SGTxt = wx.TextCtrl(self.testSSPanel,-1,value=Data['SGData']['SpGrp'],style=wx.TE_PROCESS_ENTER)
     120        SpGrp = Data['SGData']['SpGrp']
     121        if Data['SGData']['SGGray']: SpGrp += " 1'"
     122        SGTxt = wx.TextCtrl(self.testSSPanel,-1,value=SpGrp,style=wx.TE_PROCESS_ENTER)
    118123        SGTxt.Bind(wx.EVT_TEXT_ENTER,OnSpaceGroup)
    119124        mainSizer.Add(SGTxt,0,WACV)
    120         mainSizer.Add(wx.StaticText(self.testSSPanel,label=' Superspace group: '+Data['SGData']['SpGrp']),0,WACV)
     125        mainSizer.Add(wx.StaticText(self.testSSPanel,label=' Superspace group: '+SpGrp),0,WACV)
    121126        ssChoice = G2spc.SSChoice(Data['SGData'])
     127        if Data['SGData']['SGGray']: ssChoice = [G2spc.fixGray(Data['SGData'],item) for item in ssChoice]
     128        ssSym = Data['SuperSg']
     129        if Data['SGData']['SGGray']: ssSym = G2spc.fixGray(SGData,ssSym)
    122130        if ssChoice:
    123             superGp = wx.ComboBox(self.testSSPanel,value=Data['SuperSg'],choices=ssChoice,style=wx.CB_DROPDOWN)   #wx.CB_READONLY|
     131            superGp = wx.ComboBox(self.testSSPanel,value=ssSym,choices=ssChoice,style=wx.CB_DROPDOWN)   #wx.CB_READONLY|
    124132            superGp.Bind(wx.EVT_COMBOBOX,OnSuperGp)
    125133            superGp.Bind(wx.EVT_TEXT_ENTER,OnSuperGp)
    126134        else:   #nonstandard space group symbol not in my dictionary
    127             superGp = wx.TextCtrl(self.testSSPanel,value=Data['SuperSg'],style=wx.TE_PROCESS_ENTER)
     135            superGp = wx.TextCtrl(self.testSSPanel,value=ssSym,style=wx.TE_PROCESS_ENTER)
    128136            superGp.Bind(wx.EVT_TEXT_ENTER,OnSuperGp)                       
    129137        mainSizer.Add(superGp,0,WACV)
Note: See TracChangeset for help on using the changeset viewer.