Changeset 3170 for trunk/testSSymbols.py


Ignore:
Timestamp:
Dec 1, 2017 12:36:31 PM (4 years ago)
Author:
vondreele
Message:

implement saving of data & plot window sizes (along with positions)
fix issues with imageGUI displays; arrange Mask sliders to match Image Controls sliders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testSSymbols.py

    r3166 r3170  
    22import sys
    33import wx
     4import GSASIIpath
     5GSASIIpath.SetBinaryPath()
    46import GSASIIspc as G2spc
    5 import GSASIIdataGUI as G2gd
    67import GSASIIctrlGUI as G2G
    7 import numpy as np
    8 import copy
    98
    10 def create(parent):
    11     return testDeriv(parent)
    129   
    1310[wxID_FILEEXIT,
     
    1916    def _init_ctrls(self, parent):
    2017        wx.Frame.__init__(self, name='testSSymbols', parent=parent,
    21             size=wx.Size(300, 150),style=wx.DEFAULT_FRAME_STYLE, title='Test SS symbols')
     18            size=wx.DefaultSize,style=wx.DEFAULT_FRAME_STYLE, title='Test SS symbols')
    2219        self.testSSMenu = wx.MenuBar()
    2320        self.File = wx.Menu(title='')
     
    6259                    Text = '\n'+E
    6360                    wx.MessageBox(Text,caption=msg,style=Style)
     61                   
     62        def OnExhaustive(event):
     63            SpGrp = Data['SGData']['SGLatt']+Data['SGData']['SGLaue']
     64            SpGrp = G2spc.StandardizeSpcName(SpGrp)
     65            SSList = G2spc.ssdict.get(SpGrp,['',])
     66            for SSymbol in SSList:
     67                E,SSGData = G2spc.SSpcGroup(Data['SGData'],SSymbol)
     68                if SSGData:
     69                    text,table = G2spc.SSGPrint(Data['SGData'],SSGData)
     70                    Data['SSGData'] = SSGData
     71                    Data['SuperSg'] = SSymbol
     72                    msg = 'Superspace Group Information'
     73                    G2G.SGMessageBox(self,msg,text,table).Show()
     74                else:
     75                    msg = 'Superspace Group Error for'+SSymbol
     76                    Style = wx.ICON_EXCLAMATION
     77                    Text = '\n'+E
     78                    wx.MessageBox(Text,caption=msg,style=Style)           
    6479       
    6580        def OnSpaceGroup(event):
     
    117132       
    118133        SGData = G2spc.SpcGroup(Data['SGData']['SpGrp'])[1]
    119         SSGData = G2spc.SSpcGroup(SGData,Data['SuperSg'])[1]
    120134       
    121135        self.testSSPanel.DestroyChildren()
     
    139153        SStry.Bind(wx.EVT_BUTTON,OnTryAll)
    140154        mainSizer.Add(SStry,0,WACV)
     155        mainSizer.Add(wx.StaticText(self.testSSPanel,-1,' Exhaustive try: '),0,WACV)
     156        ESStry = wx.Button(self.testSSPanel,-1,'OK')
     157        ESStry.Bind(wx.EVT_BUTTON,OnExhaustive)
     158        mainSizer.Add(ESStry,0,WACV)
    141159        self.testSSPanel.SetSizer(mainSizer)
    142160        Size = mainSizer.Fit(self.testSSPanel)
Note: See TracChangeset for help on using the changeset viewer.