Changeset 368 for trunk/GSASII.py
- Timestamp:
- Sep 9, 2011 9:59:47 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r345 r368 63 63 64 64 [wxID_FILECLOSE, wxID_FILEEXIT, wxID_FILEOPEN, wxID_FILESAVE, wxID_FILESAVEAS, 65 wxID_REFINE, wxID_SOLVE, wxID_MAKEPDFS, 66 ] = [wx.NewId() for _init_coll_File_Items in range( 8)]65 wxID_REFINE, wxID_SOLVE, wxID_MAKEPDFS, wxID_VIEWLSPARMS, 66 ] = [wx.NewId() for _init_coll_File_Items in range(9)] 67 67 68 68 [wxID_PWDRREAD,wxID_SNGLREAD,wxID_ADDPHASE,wxID_DELETEPHASE, … … 145 145 id=wxID_MAKEPDFS, kind=wx.ITEM_NORMAL,text='Make new PDFs') 146 146 self.Bind(wx.EVT_MENU, self.OnMakePDFs, id=wxID_MAKEPDFS) 147 self.ViewLSParms = parent.Append(help='View least squares parameters', 148 id=wxID_VIEWLSPARMS, kind=wx.ITEM_NORMAL,text='View LS parms') 149 self.Bind(wx.EVT_MENU, self.OnViewLSParms, id=wxID_VIEWLSPARMS) 147 150 self.Refine = parent.Append(help='', id=wxID_REFINE, kind=wx.ITEM_NORMAL, 148 151 text='Refine') 149 self.Refine.Enable( True)152 self.Refine.Enable(False) 150 153 self.Bind(wx.EVT_MENU, self.OnRefine, id=wxID_REFINE) 151 154 self.Solve = parent.Append(help='', id=wxID_SOLVE, kind=wx.ITEM_NORMAL, … … 1056 1059 elif name == 'Controls': 1057 1060 data = self.PatternTree.GetItemPyData(item) 1058 if data != [0] and data != {}:1061 if data: 1059 1062 self.Refine.Enable(True) 1060 1063 self.Solve.Enable(True) #not right but something needed here … … 1343 1346 finally: 1344 1347 dlg.Destroy() 1348 1349 def OnViewLSParms(self,event): 1350 parmDict = {} 1351 self.OnFileSave(event) 1352 Histograms,Phases = G2str.GetUsedHistogramsAndPhases(self.GSASprojectfile) 1353 phaseVary,phaseDict,pawleyLookup = G2str.GetPhaseData(Phases,Print=False) 1354 hapVary,hapDict,controlDict = G2str.GetHistogramPhaseData(Phases,Histograms,Print=False) 1355 histVary,histDict,controlDict = G2str.GetHistogramData(Histograms,Print=False) 1356 varyList = phaseVary+hapVary+histVary 1357 parmDict.update(phaseDict) 1358 parmDict.update(hapDict) 1359 parmDict.update(histDict) 1360 parmKeys = parmDict.keys() 1361 parmKeys.sort() 1362 for parm in parmKeys: 1363 line = parm+str(parmDict[parm]) 1364 if parm in varyList: 1365 line += ' True' 1366 else: 1367 line += ' False' 1368 print line 1369 1370 1345 1371 1346 1372 def OnRefine(self,event):
Note: See TracChangeset
for help on using the changeset viewer.