Changeset 906
- Timestamp:
- May 15, 2013 6:18:22 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r903 r906 255 255 256 256 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. 259 285 ''' 260 286 self.lastimport = '' … … 436 462 437 463 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 ''' 438 471 # look up which format was requested 439 472 reqrdr = self.ImportMenuId.get(event.GetId()) … … 485 518 486 519 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 ''' 487 527 # look up which format was requested 488 528 reqrdr = self.ImportMenuId.get(event.GetId()) … … 535 575 536 576 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 ''' 538 582 if os.path.splitext(instfile)[1].lower() != '.instprm': # invalid file 539 583 return None … … 563 607 564 608 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 ''' 566 625 if not os.path.exists(instfile): # no such file 567 626 return {} … … 610 669 '''Open and read an instrument parameter file for a data file 611 670 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 612 681 ''' 613 682 def SetPowderInstParms(Iparm, rd): … … 837 906 838 907 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. 841 916 ''' 842 917 reqrdr = self.ImportMenuId.get(event.GetId()) # look up which format was requested … … 1117 1192 1118 1193 def OnSize(self,event): 1194 'Called when the main window is resized. Not sure why' 1119 1195 w,h = self.GetClientSizeTuple() 1120 1196 self.mainPanel.SetSize(wx.Size(w,h)) … … 1122 1198 1123 1199 def OnPatternTreeSelChanged(self, event): 1200 '''Called when a data tree item is selected''' 1124 1201 if self.TreeItemDelete: 1125 1202 self.TreeItemDelete = False … … 1135 1212 1136 1213 def OnPatternTreeItemCollapsed(self, event): 1214 'Called when a tree item is collapsed' 1137 1215 event.Skip() 1138 1216 1139 1217 def OnPatternTreeItemExpanded(self, event): 1218 'Called when a tree item is expanded' 1140 1219 event.Skip() 1141 1220 1142 1221 def OnPatternTreeItemDelete(self, event): 1222 'Called when a tree item is deleted -- not sure what this does' 1143 1223 self.TreeItemDelete = True 1144 1224 1145 1225 def OnPatternTreeItemActivated(self, event): 1226 'Called when a tree item is activated' 1146 1227 event.Skip() 1147 1228 1148 1229 def OnPatternTreeKeyDown(self,event): 1230 'Not sure what this does' 1149 1231 key = event.GetKeyCode() 1150 1232 item = self.PickId … … 1158 1240 1159 1241 def OnReadPowderPeaks(self,event): 1242 'Bound to menu Data/Read Powder Peaks -- still needed?' 1160 1243 Cuka = 1.54052 1161 1244 self.CheckNotebook() … … 1183 1266 1184 1267 def OnImageRead(self,event): 1268 'Called to read in an image in any known format' 1185 1269 self.CheckNotebook() 1186 1270 dlg = wx.FileDialog( … … 1269 1353 1270 1354 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. 1272 1356 (BHT) correct? 1273 1357 ''' … … 1295 1379 1296 1380 class CopyDialog(wx.Dialog): 1381 '''Creates a dialog for copying control settings between 1382 data tree items''' 1297 1383 def __init__(self,parent,title,text,data): 1298 1384 wx.Dialog.__init__(self,parent,-1,title, … … 1346 1432 1347 1433 class SumDialog(wx.Dialog): 1434 'Allows user to supply scale factor(s) when summing data' 1348 1435 def __init__(self,parent,title,text,dataType,data): 1349 1436 wx.Dialog.__init__(self,parent,-1,title, … … 1486 1573 1487 1574 def OnPwdrSum(self,event): 1575 'Sum together powder data(?)' 1488 1576 TextList = [] 1489 1577 DataList = [] … … 1582 1670 1583 1671 def OnImageSum(self,event): 1672 'Sum together image data(?)' 1584 1673 TextList = [] 1585 1674 DataList = [] … … 1684 1773 1685 1774 def OnAddPhase(self,event): 1775 'Add a new, empty phase to the tree. Called by Data/Add Phase menu' 1686 1776 if not G2gd.GetPatternTreeItemId(self,self.root,'Phases'): 1687 1777 sub = self.PatternTree.AppendItem(parent=self.root,text='Phases') … … 1699 1789 1700 1790 def OnDeletePhase(self,event): 1791 'Delete a phase from the tree. Called by Data/Delete Phase menu' 1701 1792 #Hmm, also need to delete this phase from Reflection Lists for each PWDR histogram 1702 1793 if self.dataFrame: … … 1743 1834 1744 1835 def OnRenameData(self,event): 1836 'Renames an existing phase. Called by Data/Rename Phase menu' 1745 1837 name = self.PatternTree.GetItemText(self.PickId) 1746 1838 if 'PWDR' in name or 'HKLF' in name or 'IMG' in name: … … 1755 1847 1756 1848 def GetFileList(self,fileType,skip=None): #potentially useful? 1849 'Appears unused. Note routine of same name in GSASIIpwdGUI' 1757 1850 fileList = [] 1758 1851 Source = '' … … 1772 1865 1773 1866 def OnDataDelete(self, event): 1867 '''Delete one or more histograms from data tree. Called by the 1868 Data/DeleteData menu 1869 ''' 1774 1870 TextList = ['All Data'] 1775 1871 DelList = [] … … 1821 1917 1822 1918 def OnFileOpen(self, event): 1919 '''Reads in a GSAS-II .gpx project file in response to the 1920 File/Open Project menu button 1921 ''' 1823 1922 result = '' 1824 1923 Id = 0 … … 1873 1972 1874 1973 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 ''' 1875 1978 if self.dataFrame: 1876 1979 self.dataFrame.Clear() … … 1892 1995 1893 1996 def OnFileSave(self, event): 1997 '''Save the current project in response to the 1998 File/Save Project menu button 1999 ''' 1894 2000 1895 2001 if self.GSASprojectfile: … … 1900 2006 1901 2007 def OnFileSaveas(self, event): 2008 '''Save the current project in response to the 2009 File/Save as menu button 2010 ''' 1902 2011 dlg = wx.FileDialog(self, 'Choose GSAS-II project file name', '.', '', 1903 2012 'GSAS-II project file (*.gpx)|*.gpx',wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.CHANGE_DIR) … … 1915 2024 1916 2025 def ExitMain(self, event): 2026 '''Called if the main window is closed''' 1917 2027 if self.undofile: 1918 2028 os.remove(self.undofile) … … 1920 2030 1921 2031 def OnFileExit(self, event): 2032 '''Called in response to the File/Quit menu button''' 1922 2033 if self.dataFrame: 1923 2034 self.dataFrame.Clear() … … 2019 2130 2020 2131 def OnMakePDFs(self,event): 2132 '''Calculates PDFs 2133 ''' 2021 2134 tth2q = lambda t,w:4.0*math.pi*sind(t/2.0)/w 2022 2135 TextList = ['All PWDR'] … … 2063 2176 def GetPWDRdatafromTree(self,PWDRname): 2064 2177 ''' 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 2070 2185 ''' 2071 2186 PWDRdata = {} … … 2087 2202 def GetHKLFdatafromTree(self,HKLFname): 2088 2203 ''' 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 2094 2211 ''' 2095 2212 HKLFdata = {} … … 2103 2220 2104 2221 def GetPhaseData(self): 2222 '''Returns a list of defined phases. Used only in GSASIIgrid 2223 Note routine :mod:`GSASIIstruct.GetPhaseData` also exists. 2224 ''' 2105 2225 phaseData = {} 2106 2226 if G2gd.GetPatternTreeItemId(self,self.root,'Phases'): … … 2122 2242 ''' Returns all histograms that are found in any phase 2123 2243 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 2127 2248 ''' 2128 2249 phaseData = self.GetPhaseData() … … 2153 2274 2154 2275 class ViewParmDialog(wx.Dialog): 2276 '''Window to show all parameters in the refinement. 2277 Called from :mod:`OnViewLSParms` 2278 ''' 2155 2279 def __init__(self,parent,title,parmDict): 2156 2280 wx.Dialog.__init__(self,parent,-1,title,size=(300,430), … … 2173 2297 2174 2298 def OnViewLSParms(self,event): 2299 '''Displays a window showing all parameters in the refinement. 2300 Called from the Calculate/View LS Parms menu. 2301 ''' 2175 2302 parmDict = {} 2176 2303 Histograms,Phases = self.GetUsedHistogramsAndPhasesfromTree() … … 2206 2333 2207 2334 def OnRefine(self,event): 2335 '''Perform a refinement. 2336 Called from the Calculate/Refine menu. 2337 ''' 2208 2338 self.OnFileSave(event) 2209 2339 # check that constraints are OK here … … 2271 2401 2272 2402 def OnSeqRefine(self,event): 2403 '''Perform a sequential refinement. 2404 Called from the Calculate/Sequential refine menu. 2405 ''' 2273 2406 Id = G2gd.GetPatternTreeItemId(self,self.root,'Sequental results') 2274 2407 if not Id: … … 2324 2457 2325 2458 def ErrorDialog(self,title,message,parent=None, wtype=wx.OK): 2459 'Display an error message' 2326 2460 result = None 2327 2461 if parent is None: -
trunk/GSASIIconstrGUI.py
r904 r906 645 645 UpdatePhaseConstr() 646 646 647 G2frame.dataDisplay.Bind(wx. EVT_NOTEBOOK_PAGE_CHANGED, OnPageChanged)647 G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged) 648 648 # validate all the constrants -- should not see any errors here normally 649 649 allcons = [] … … 1461 1461 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2gd.wxID_RESIDUETORSSEQ) 1462 1462 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) 1464 1464 1465 1465 VectorRB = wx.ScrolledWindow(G2frame.dataDisplay) -
trunk/GSASIIddataGUI.py
r904 r906 967 967 mainSizer.Add((0,5),0) 968 968 pass 969 mainSizer.Add(wx.StaticText(DData,-1,150*'-'),0,)969 #G2gd.HorizontalLine(mainSizer,DData) 970 970 mainSizer.Add((5,5),0) 971 971 -
trunk/GSASIIgrid.py
r903 r906 1335 1335 ################################################################################ 1336 1336 1337 class GSNoteBook(wx.Notebook): 1337 class GSNoteBook(wx.aui.AuiNotebook): 1338 '''Notebook implemented with wx.aui extension''' 1338 1339 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) 1340 1343 if size: self.SetSize(size) 1341 1344 … … 1348 1351 if self.GetPageText(page) == name: 1349 1352 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 1366 1370 ################################################################################ 1367 1371 ##### GSGrid … … 1371 1375 def __init__(self, parent, name=''): 1372 1376 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 1374 1380 1375 1381 def Clear(self): … … 2066 2072 # print G2frame.PatternTree.GetItemText(item) 2067 2073 2068 oldPage = 0 2074 oldPage = 0 # will be set later if already on a Phase item 2069 2075 if G2frame.dataFrame: 2070 2076 SetDataMenuBar(G2frame) … … 2317 2323 2318 2324 def 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) 2331 2335 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 2343 def 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 8 8 # $Id$ 9 9 ########### SVN repository information ################### 10 ''' 11 *GSASIIphsGUI: Phase GUI* 12 ========================= 13 Module to create the GUI for display of phase information 14 in the data display window when a phase is selected. 15 (Items displayed by some tabs is found in other modules.) 16 17 ''' 10 18 import wx 11 19 import wx.grid as wg … … 49 57 50 58 def 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 52 77 #patch 53 78 if 'RBModels' not in data: … … 720 745 mainSizer.Add((5,5),0) 721 746 mainSizer.Add(ElemSizer()) 722 mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)723 747 G2gd.HorizontalLine(mainSizer,dataDisplay) 748 724 749 mainSizer.Add(PawleySizer()) 725 mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)750 G2gd.HorizontalLine(mainSizer,dataDisplay) 726 751 727 752 mainSizer.Add(MapSizer()) 728 mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)753 G2gd.HorizontalLine(mainSizer,dataDisplay) 729 754 730 755 mainSizer.Add(FlipSizer()) 731 mainSizer.Add(wx.StaticText(dataDisplay,-1,150*'-'),0,)756 G2gd.HorizontalLine(mainSizer,dataDisplay) 732 757 733 758 mainSizer.Add(MCSASizer()) … … 745 770 746 771 def FillAtomsGrid(Atoms): 747 748 772 G2frame.dataFrame.setSizePosLeft([700,300]) 749 773 generalData = data['General'] … … 4406 4430 General = wx.Window(G2frame.dataDisplay) 4407 4431 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 4417 4432 DData = wx.ScrolledWindow(G2frame.dataDisplay) 4418 4433 G2frame.dataDisplay.AddPage(DData,'Data') … … 4431 4446 G2frame.PawleyRefl = G2gd.GSGrid(G2frame.dataDisplay) 4432 4447 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 1824 1824 UpdateBondRestr(restrData['Bond']) 1825 1825 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 4340 4340 except: 4341 4341 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 4348 4345 raise Exception(' *** Refine aborted ***') 4349 4346 # # check to see which generated parameters are fully varied
Note: See TracChangeset
for help on using the changeset viewer.