Changeset 906


Ignore:
Timestamp:
May 15, 2013 6:18:22 PM (9 years ago)
Author:
toby
Message:

switch to aui.notebook for data display window; work on phase data display window - quicker initial draw, fix horizontal lines (needs more work); more sphinx documentation

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r903 r906  
    255255
    256256    def OnImportGeneric(self,reader,readerlist,label,multiple=False):
    257         '''Call the requested import reader or all of the appropriate
    258         import readers in response to a menu item
     257        '''Used to import Phases, powder dataset or single
     258        crystal datasets (structure factor tables) using reader objects
     259        subclassed from GSASIIIO.ImportPhase, GSASIIIO.ImportStructFactor
     260        or GSASIIIO.ImportPowderData. If a reader is specified, only
     261        that will be attempted, but if no reader is specified, every one
     262        that is potentially compatible (by file extension) will
     263        be tried on the selected file(s).
     264
     265        :param readerobject reader: This will be a reference to
     266          a particular object to be used to read a file or None,
     267          if every appropriate reader should be used.
     268
     269        :param list readerlist: a list of reader objects appropriate for
     270          the current read attempt. At present, this will be either
     271          self.ImportPhaseReaderlist, self.ImportSfactReaderlist or
     272          self.ImportPowderReaderlist (defined in _init_Imports from
     273          the files found in the path), but in theory this list could
     274          be tailored. Used only when reader is None.
     275
     276        :param str label: string to place on the open file dialog:
     277          Open `label` input file
     278
     279        :param bool multiple: True if multiple files can be selected
     280          in the file dialog. False is default. At present True is used
     281          only for reading of powder data.
     282         
     283        :returns: a list of reader objects (rd_list) that were able
     284          to read the specified file(s). This list may be empty.
    259285        '''
    260286        self.lastimport = ''
     
    436462
    437463    def OnImportPhase(self,event):
     464        '''Called in response to an Import/Phase/... menu item
     465        to read phase information.
     466        dict self.ImportMenuId is used to look up the specific
     467        reader item associated with the menu item, which will be
     468        None for the last menu item, which is the "guess" option
     469        where all appropriate formats will be tried.
     470        '''
    438471        # look up which format was requested
    439472        reqrdr = self.ImportMenuId.get(event.GetId())
     
    485518
    486519    def OnImportSfact(self,event):
     520        '''Called in response to an Import/Structure Factor/... menu item
     521        to read single crystal datasets.
     522        dict self.ImportMenuId is used to look up the specific
     523        reader item associated with the menu item, which will be
     524        None for the last menu item, which is the "guess" option
     525        where all appropriate formats will be tried.
     526        '''
    487527        # look up which format was requested
    488528        reqrdr = self.ImportMenuId.get(event.GetId())
     
    535575           
    536576    def ReadPowderInstprm(self,instfile):       #fix the write routine for [inst1,inst2] style
    537         '''Read a GSAS-II (new) instrument parameter file'''
     577        '''Read a GSAS-II (new) instrument parameter file
     578
     579        :param str instfile: name of instrument parameter file
     580
     581        '''
    538582        if os.path.splitext(instfile)[1].lower() != '.instprm': # invalid file
    539583            return None           
     
    563607       
    564608    def ReadPowderIparm(self,instfile,bank,databanks,rd):
    565         '''Read a GSAS (old) instrument parameter file'''
     609        '''Read a GSAS (old) instrument parameter file
     610
     611        :param str instfile: name of instrument parameter file
     612
     613        :param int bank: the bank number read in the raw data file
     614
     615        :param int databanks: the number of banks in the raw data file.
     616          If the number of banks in the data and instrument parameter files
     617          agree, then the sets of banks are assumed to match up and bank
     618          is used to select the instrument parameter file. If not, the user
     619          is asked to make a selection.
     620
     621        :param obj rd: the raw data (histogram) data object. This
     622          sets rd.instbank.
     623
     624        '''
    566625        if not os.path.exists(instfile): # no such file
    567626            return {}
     
    610669        '''Open and read an instrument parameter file for a data file
    611670        Returns the list of parameters used in the data tree
     671
     672        :param obj rd: the raw data (histogram) data object.
     673
     674        :param str prevIparm: not used
     675
     676        :param str lastIparmfile: Name of last instrument parameter
     677          file that was read, or a empty string.
     678
     679        :param str lastdatafile: Name of last data file that was read.
     680
    612681        '''
    613682        def SetPowderInstParms(Iparm, rd):
     
    837906
    838907    def OnImportPowder(self,event):
    839         '''reads powder data using a variety of formats
    840         reads an instrument parameter file for each dataset
     908        '''Called in response to an Import/Powder Data/... menu item
     909        to read a powder diffraction data set.
     910        dict self.ImportMenuId is used to look up the specific
     911        reader item associated with the menu item, which will be
     912        None for the last menu item, which is the "guess" option
     913        where all appropriate formats will be tried.
     914
     915        Also reads an instrument parameter file for each dataset.
    841916        '''
    842917        reqrdr = self.ImportMenuId.get(event.GetId())  # look up which format was requested
     
    11171192
    11181193    def OnSize(self,event):
     1194        'Called when the main window is resized. Not sure why'
    11191195        w,h = self.GetClientSizeTuple()
    11201196        self.mainPanel.SetSize(wx.Size(w,h))
     
    11221198                       
    11231199    def OnPatternTreeSelChanged(self, event):
     1200        '''Called when a data tree item is selected'''
    11241201        if self.TreeItemDelete:
    11251202            self.TreeItemDelete = False
     
    11351212       
    11361213    def OnPatternTreeItemCollapsed(self, event):
     1214        'Called when a tree item is collapsed'
    11371215        event.Skip()
    11381216
    11391217    def OnPatternTreeItemExpanded(self, event):
     1218        'Called when a tree item is expanded'
    11401219        event.Skip()
    11411220       
    11421221    def OnPatternTreeItemDelete(self, event):
     1222        'Called when a tree item is deleted -- not sure what this does'
    11431223        self.TreeItemDelete = True
    11441224
    11451225    def OnPatternTreeItemActivated(self, event):
     1226        'Called when a tree item is activated'
    11461227        event.Skip()
    11471228       
    11481229    def OnPatternTreeKeyDown(self,event):
     1230        'Not sure what this does'
    11491231        key = event.GetKeyCode()
    11501232        item = self.PickId
     
    11581240               
    11591241    def OnReadPowderPeaks(self,event):
     1242        'Bound to menu Data/Read Powder Peaks -- still needed?'
    11601243        Cuka = 1.54052
    11611244        self.CheckNotebook()
     
    11831266           
    11841267    def OnImageRead(self,event):
     1268        'Called to read in an image in any known format'
    11851269        self.CheckNotebook()
    11861270        dlg = wx.FileDialog(
     
    12691353
    12701354    def CheckNotebook(self):
    1271         '''Make sure the data tree has the minimally expected controls
     1355        '''Make sure the data tree has the minimally expected controls.
    12721356        (BHT) correct?
    12731357        '''
     
    12951379               
    12961380    class CopyDialog(wx.Dialog):
     1381        '''Creates a dialog for copying control settings between
     1382        data tree items'''
    12971383        def __init__(self,parent,title,text,data):
    12981384            wx.Dialog.__init__(self,parent,-1,title,
     
    13461432       
    13471433    class SumDialog(wx.Dialog):
     1434        'Allows user to supply scale factor(s) when summing data'
    13481435        def __init__(self,parent,title,text,dataType,data):
    13491436            wx.Dialog.__init__(self,parent,-1,title,
     
    14861573           
    14871574    def OnPwdrSum(self,event):
     1575        'Sum together powder data(?)'
    14881576        TextList = []
    14891577        DataList = []
     
    15821670
    15831671    def OnImageSum(self,event):
     1672        'Sum together image data(?)'
    15841673        TextList = []
    15851674        DataList = []
     
    16841773                     
    16851774    def OnAddPhase(self,event):
     1775        'Add a new, empty phase to the tree. Called by Data/Add Phase menu'
    16861776        if not G2gd.GetPatternTreeItemId(self,self.root,'Phases'):
    16871777            sub = self.PatternTree.AppendItem(parent=self.root,text='Phases')
     
    16991789       
    17001790    def OnDeletePhase(self,event):
     1791        'Delete a phase from the tree. Called by Data/Delete Phase menu'
    17011792        #Hmm, also need to delete this phase from Reflection Lists for each PWDR histogram
    17021793        if self.dataFrame:
     
    17431834               
    17441835    def OnRenameData(self,event):
     1836        'Renames an existing phase. Called by Data/Rename Phase menu'
    17451837        name = self.PatternTree.GetItemText(self.PickId)     
    17461838        if 'PWDR' in name or 'HKLF' in name or 'IMG' in name:
     
    17551847       
    17561848    def GetFileList(self,fileType,skip=None):        #potentially useful?
     1849        'Appears unused. Note routine of same name in GSASIIpwdGUI'
    17571850        fileList = []
    17581851        Source = ''
     
    17721865           
    17731866    def OnDataDelete(self, event):
     1867        '''Delete one or more histograms from data tree. Called by the
     1868        Data/DeleteData menu
     1869        '''
    17741870        TextList = ['All Data']
    17751871        DelList = []
     
    18211917
    18221918    def OnFileOpen(self, event):
     1919        '''Reads in a GSAS-II .gpx project file in response to the
     1920        File/Open Project menu button
     1921        '''
    18231922        result = ''
    18241923        Id = 0
     
    18731972
    18741973    def OnFileClose(self, event):
     1974        '''Clears the data tree in response to the
     1975        File/Close Project menu button. User is given option to save
     1976        the project.
     1977        '''
    18751978        if self.dataFrame:
    18761979            self.dataFrame.Clear()
     
    18921995
    18931996    def OnFileSave(self, event):
     1997        '''Save the current project in response to the
     1998        File/Save Project menu button
     1999        '''
    18942000       
    18952001        if self.GSASprojectfile:
     
    19002006
    19012007    def OnFileSaveas(self, event):
     2008        '''Save the current project in response to the
     2009        File/Save as menu button
     2010        '''
    19022011        dlg = wx.FileDialog(self, 'Choose GSAS-II project file name', '.', '',
    19032012            'GSAS-II project file (*.gpx)|*.gpx',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.CHANGE_DIR)
     
    19152024
    19162025    def ExitMain(self, event):
     2026        '''Called if the main window is closed'''
    19172027        if self.undofile:
    19182028            os.remove(self.undofile)
     
    19202030       
    19212031    def OnFileExit(self, event):
     2032        '''Called in response to the File/Quit menu button'''
    19222033        if self.dataFrame:
    19232034            self.dataFrame.Clear()
     
    20192130
    20202131    def OnMakePDFs(self,event):
     2132        '''Calculates PDFs
     2133        '''
    20212134        tth2q = lambda t,w:4.0*math.pi*sind(t/2.0)/w
    20222135        TextList = ['All PWDR']
     
    20632176    def GetPWDRdatafromTree(self,PWDRname):
    20642177        ''' Returns powder data from GSASII tree
    2065         input:
    2066             PWDRname = powder histogram name as obtained from GetHistogramNames
    2067         return:
    2068             PWDRdata = powder data dictionary with:
    2069                 Data - powder data arrays, Limits, Instrument Parameters, Sample Parameters           
     2178
     2179        :param str PWDRname: a powder histogram name as obtained from
     2180          :mod:`GSASIIstruct.GetHistogramNames`
     2181
     2182        :returns: PWDRdata = powder data dictionary with
     2183          Powder data arrays, Limits, Instrument Parameters,
     2184          Sample Parameters           
    20702185        '''
    20712186        PWDRdata = {}
     
    20872202    def GetHKLFdatafromTree(self,HKLFname):
    20882203        ''' Returns single crystal data from GSASII tree
    2089         input:
    2090             HKLFname = single crystal histogram name as obtained from GetHistogramNames
    2091         return:
    2092             HKLFdata = single crystal data list of reflections: for each reflection:
    2093                 HKLF =
     2204
     2205        :param str HKLFname: a single crystal histogram name as obtained
     2206          from
     2207          :mod:`GSASIIstruct.GetHistogramNames`
     2208
     2209        :returns: HKLFdata = single crystal data list of reflections
     2210
    20942211        '''
    20952212        HKLFdata = {}
     
    21032220       
    21042221    def GetPhaseData(self):
     2222        '''Returns a list of defined phases. Used only in GSASIIgrid
     2223        Note routine :mod:`GSASIIstruct.GetPhaseData` also exists.
     2224        '''
    21052225        phaseData = {}
    21062226        if G2gd.GetPatternTreeItemId(self,self.root,'Phases'):
     
    21222242        ''' Returns all histograms that are found in any phase
    21232243        and any phase that uses a histogram
    2124         return:
    2125             Histograms = dictionary of histograms as {name:data,...}
    2126             Phases = dictionary of phases that use histograms
     2244        :returns: two dicts:
     2245
     2246            * Histograms = dictionary of histograms as {name:data,...}
     2247            * Phases = dictionary of phases that use histograms
    21272248        '''
    21282249        phaseData = self.GetPhaseData()
     
    21532274       
    21542275    class ViewParmDialog(wx.Dialog):
     2276        '''Window to show all parameters in the refinement.
     2277        Called from :mod:`OnViewLSParms`
     2278        '''
    21552279        def __init__(self,parent,title,parmDict):
    21562280            wx.Dialog.__init__(self,parent,-1,title,size=(300,430),
     
    21732297                           
    21742298    def OnViewLSParms(self,event):
     2299        '''Displays a window showing all parameters in the refinement.
     2300        Called from the Calculate/View LS Parms menu.
     2301        '''
    21752302        parmDict = {}
    21762303        Histograms,Phases = self.GetUsedHistogramsAndPhasesfromTree()
     
    22062333       
    22072334    def OnRefine(self,event):
     2335        '''Perform a refinement.
     2336        Called from the Calculate/Refine menu.
     2337        '''       
    22082338        self.OnFileSave(event)
    22092339        # check that constraints are OK here
     
    22712401
    22722402    def OnSeqRefine(self,event):
     2403        '''Perform a sequential refinement.
     2404        Called from the Calculate/Sequential refine menu.
     2405        '''       
    22732406        Id = G2gd.GetPatternTreeItemId(self,self.root,'Sequental results')
    22742407        if not Id:
     
    23242457       
    23252458    def ErrorDialog(self,title,message,parent=None, wtype=wx.OK):
     2459        'Display an error message'
    23262460        result = None
    23272461        if parent is None:
  • trunk/GSASIIconstrGUI.py

    r904 r906  
    645645    UpdatePhaseConstr()
    646646
    647     G2frame.dataDisplay.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)
     647    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    648648    # validate all the constrants -- should not see any errors here normally
    649649    allcons = []
     
    14611461    G2frame.dataFrame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2gd.wxID_RESIDUETORSSEQ)
    14621462    G2frame.dataDisplay = G2gd.GSNoteBook(parent=G2frame.dataFrame,size=G2frame.dataFrame.GetClientSize())
    1463     G2frame.dataDisplay.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)
     1463    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
    14641464
    14651465    VectorRB = wx.ScrolledWindow(G2frame.dataDisplay)
  • trunk/GSASIIddataGUI.py

    r904 r906  
    967967            mainSizer.Add((0,5),0)
    968968            pass
    969         mainSizer.Add(wx.StaticText(DData,-1,150*'-'),0,)
     969        #G2gd.HorizontalLine(mainSizer,DData)
    970970    mainSizer.Add((5,5),0)
    971971
  • trunk/GSASIIgrid.py

    r903 r906  
    13351335################################################################################           
    13361336       
    1337 class GSNoteBook(wx.Notebook):
     1337class GSNoteBook(wx.aui.AuiNotebook):
     1338    '''Notebook implemented with wx.aui extension'''
    13381339    def __init__(self, parent, name='',size = None):
    1339         wx.Notebook.__init__(self, parent, -1, name=name, style= wx.BK_TOP)
     1340        wx.aui.AuiNotebook.__init__(self, parent, -1,
     1341                                    style=wx.aui.AUI_NB_TOP |
     1342                                    wx.aui.AUI_NB_SCROLL_BUTTONS)
    13401343        if size: self.SetSize(size)
    13411344                                                     
     
    13481351            if self.GetPageText(page) == name:
    13491352                return page
    1350 class GSauiNoteBook(wx.aui.AuiNotebook):
    1351     '''Notebook implemented with wx.aui extension'''
    1352     def __init__(self, parent, name='',size = None):
    1353         wx.aui.AuiNotebook.__init__(self, parent, -1)
    1354         #if size: self.SetSize(size)
    1355                                                      
    1356     def Clear(self):       
    1357         GSNoteBook.DeleteAllPages(self)
    1358        
    1359     def FindPage(self,name):
    1360         numPage = self.GetPageCount()
    1361         for page in range(numPage):
    1362             if self.GetPageText(page) == name:
    1363                 return page
    1364 
    1365        
     1353
     1354    # def __getattribute__(self,name):
     1355    #     '''This method provides a way to print out a message every time
     1356    #     that a method in a class is called -- to see what all the calls
     1357    #     might be, or where they might be coming from.
     1358    #     Cute trick for debugging!
     1359    #     '''
     1360    #     attr = object.__getattribute__(self, name)
     1361    #     if hasattr(attr, '__call__'):
     1362    #         def newfunc(*args, **kwargs):
     1363    #             print('GSauiNoteBook calling %s' %attr.__name__)
     1364    #             result = attr(*args, **kwargs)
     1365    #             return result
     1366    #         return newfunc
     1367    #     else:
     1368    #         return attr
     1369           
    13661370################################################################################
    13671371#####  GSGrid
     
    13711375    def __init__(self, parent, name=''):
    13721376        wg.Grid.__init__(self,parent,-1,name=name)                   
    1373         self.SetSize(parent.GetClientSize())
     1377        #self.SetSize(parent.GetClientSize())
     1378        # above removed to speed drawing of initial grid
     1379        # does not appear to be needed
    13741380           
    13751381    def Clear(self):
     
    20662072#    print G2frame.PatternTree.GetItemText(item)
    20672073   
    2068     oldPage = 0
     2074    oldPage = 0 # will be set later if already on a Phase item
    20692075    if G2frame.dataFrame:
    20702076        SetDataMenuBar(G2frame)
     
    23172323
    23182324def SetDataMenuBar(G2frame,menu=None):
    2319         '''Set the menu for the data frame. On the Mac put this
    2320         menu for the data tree window instead.
    2321 
    2322         Note that data frame items do not have menus, for these (menu=None)
    2323         display a blank menu or on the Mac display the standard menu for
    2324         the data tree window.
    2325         '''
    2326         if sys.platform == "darwin":
    2327             if menu is None:
    2328                 G2frame.SetMenuBar(G2frame.GSASIIMenu)
    2329             else:
    2330                 G2frame.SetMenuBar(menu)
     2325    '''Set the menu for the data frame. On the Mac put this
     2326    menu for the data tree window instead.
     2327
     2328    Note that data frame items do not have menus, for these (menu=None)
     2329    display a blank menu or on the Mac display the standard menu for
     2330    the data tree window.
     2331    '''
     2332    if sys.platform == "darwin":
     2333        if menu is None:
     2334            G2frame.SetMenuBar(G2frame.GSASIIMenu)
    23312335        else:
    2332             if menu is None:
    2333                 G2frame.dataFrame.SetMenuBar(G2frame.dataFrame.BlankMenu)
    2334             else:
    2335                 G2frame.dataFrame.SetMenuBar(menu)
     2336            G2frame.SetMenuBar(menu)
     2337    else:
     2338        if menu is None:
     2339            G2frame.dataFrame.SetMenuBar(G2frame.dataFrame.BlankMenu)
     2340        else:
     2341            G2frame.dataFrame.SetMenuBar(menu)
     2342
     2343def HorizontalLine(sizer,parent):
     2344    '''Draws a horizontal line as wide as the window.
     2345    This shows up on the Mac as a very thin line, no matter what I do
     2346    '''
     2347    line = wx.StaticLine(parent,-1, size=(-1,3), style=wx.LI_HORIZONTAL)
     2348    sizer.Add(line, 0, wx.EXPAND|wx.ALIGN_CENTER|wx.ALL, 10)
     2349
  • trunk/GSASIIphsGUI.py

    r889 r906  
    88# $Id$
    99########### SVN repository information ###################
     10'''
     11*GSASIIphsGUI: Phase GUI*
     12=========================
     13Module to create the GUI for display of phase information
     14in the data display window when a phase is selected.
     15(Items displayed by some tabs is found in other modules.)
     16
     17'''
    1018import wx
    1119import wx.grid as wg
     
    4957
    5058def UpdatePhaseData(G2frame,Item,data,oldPage):
    51    
     59    '''Create the data display window contents when a phase is clicked on
     60    in the man (data tree) window.
     61    Called only from :mod:`GSASIIgrid.MovePatternTreeToGrid`,
     62    which in turn is called from :mod:`GSASII.GSASII.OnPatternTreeSelChanged`
     63    when a tree item is selected.
     64
     65    :param wx.frame G2frame: the main GSAS-II frame object
     66
     67    :param wx.TreeItemId Item: the tree item that was selected
     68
     69    :param dict data: all the information on the phase in a dictionary
     70
     71    :param int oldPage: This sets a tab to select when moving
     72      from one phase to another, in which case the same tab is selected
     73      to display first. The default is 0, which brings up the General tab.
     74
     75    '''
     76       
    5277#patch
    5378    if 'RBModels' not in data:
     
    720745            mainSizer.Add((5,5),0)           
    721746            mainSizer.Add(ElemSizer())
    722         mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)
    723            
     747        G2gd.HorizontalLine(mainSizer,dataDisplay)
     748
    724749        mainSizer.Add(PawleySizer())
    725         mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)
     750        G2gd.HorizontalLine(mainSizer,dataDisplay)
    726751       
    727752        mainSizer.Add(MapSizer())
    728         mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)
     753        G2gd.HorizontalLine(mainSizer,dataDisplay)
    729754
    730755        mainSizer.Add(FlipSizer())
    731         mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)
     756        G2gd.HorizontalLine(mainSizer,dataDisplay)
    732757
    733758        mainSizer.Add(MCSASizer())
     
    745770
    746771    def FillAtomsGrid(Atoms):
    747 
    748772        G2frame.dataFrame.setSizePosLeft([700,300])
    749773        generalData = data['General']
     
    44064430    General = wx.Window(G2frame.dataDisplay)
    44074431    G2frame.dataDisplay.AddPage(General,'General')
    4408     G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral)
    4409     G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)
    4410     G2frame.dataFrame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)
    4411     G2frame.dataFrame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)
    4412     G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)
    4413     SetupGeneral()
    4414     GeneralData = data['General']
    4415     UpdateGeneral()
    4416 
    44174432    DData = wx.ScrolledWindow(G2frame.dataDisplay)
    44184433    G2frame.dataDisplay.AddPage(DData,'Data')
     
    44314446    G2frame.PawleyRefl = G2gd.GSGrid(G2frame.dataDisplay)
    44324447    G2frame.dataDisplay.AddPage(G2frame.PawleyRefl,'Pawley reflections')
    4433            
    4434     G2frame.dataDisplay.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)
    4435     G2frame.dataDisplay.SetSelection(oldPage)
    4436 
     4448   
     4449    G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)
     4450    G2frame.dataFrame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)
     4451    G2frame.dataFrame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)
     4452    G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)
     4453    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
     4454
     4455    G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral)
     4456    SetupGeneral()
     4457    GeneralData = data['General']
     4458    if oldPage:
     4459        G2frame.dataDisplay.SetSelection(oldPage)
     4460    else:
     4461        UpdateGeneral()
     4462   
     4463
  • trunk/GSASIIrestrGUI.py

    r904 r906  
    18241824    UpdateBondRestr(restrData['Bond'])
    18251825
    1826     G2frame.dataDisplay.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)
     1826    G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged)
  • trunk/GSASIIstruct.py

    r905 r906  
    43404340    except:
    43414341        print ' *** ERROR - your constraints are internally inconsistent ***'
    4342         # traceback for debug
    4343         #print 'varyList',varyList
    4344         #print 'constrDict',constrDict
    4345         #print 'fixedList',fixedList
    4346         #import traceback
    4347         #print traceback.format_exc()
     4342        errmsg, warnmsg = CheckConstraints(varylist,constrDict,fixedList)
     4343        print 'Errors',errmsg
     4344        if warnmsg: print 'Warnings',warnmsg
    43484345        raise Exception(' *** Refine aborted ***')
    43494346    # # check to see which generated parameters are fully varied
Note: See TracChangeset for help on using the changeset viewer.