Changeset 420 for trunk/GSASIIgrid.py
- Timestamp:
- Nov 17, 2011 1:35:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r415 r420 79 79 wxID_PDFCOMPUTE, wxID_PDFCOMPUTEALL, wxID_PDFADDELEMENT, wxID_PDFDELELEMENT, 80 80 ] = [wx.NewId() for _init_coll_PDF_Items in range(7)] 81 82 [ wxID_HELP, 83 ] = [wx.NewId() for _init_coll_Help_Items in range(1)] 81 84 82 85 VERY_LIGHT_GREY = wx.Colour(235,235,235) … … 309 312 self.PDFCompute = parent.Append(help='Compute all PDFs', id=wxID_PDFCOMPUTEALL, kind=wx.ITEM_NORMAL, 310 313 text='Compute all PDFs') 311 312 314 313 315 def _init_utils(self): 314 316 self.BlankMenu = wx.MenuBar() … … 742 744 'title' - histogram name; same as dict item name 743 745 'newAtomDict' - new atom parameters after shifts applied 746 'newCellDict' - new cell parameters after shifts to A0-A5 applied' 744 747 """ 745 748 if not data: … … 747 750 return 748 751 histNames = data['histNames'] 749 752 753 def GetSampleParms(): 754 sampleParmDict = {'Temperature':[],'Pressure':[],'Humidity':[],'Voltage':[],'Force':[],} 755 sampleParm = {} 756 for name in histNames: 757 Id = GetPatternTreeItemId(self,self.root,name) 758 sampleData = self.PatternTree.GetItemPyData(GetPatternTreeItemId(self,Id,'Sample Parameters')) 759 for item in sampleParmDict: 760 sampleParmDict[item].append(sampleData[item]) 761 for item in sampleParmDict: 762 frstValue = sampleParmDict[item][0] 763 if np.any(np.array(sampleParmDict[item])-frstValue): 764 sampleParm[item] = sampleParmDict[item] 765 return sampleParm 766 750 767 def GetSigData(parm): 751 768 sigData = [] … … 770 787 plotNames.append(self.SeqTable.GetColLabelValue(col)) 771 788 plotData = np.array(plotData) 772 G2plt.PlotSeq(self,plotData,plotSig,plotNames )789 G2plt.PlotSeq(self,plotData,plotSig,plotNames,sampleParms) 773 790 elif rows: 774 791 name = histNames[rows[0]] … … 782 799 if item in data['varyList']: 783 800 atomList[newAtomDict[item][0]] = item 801 sampleParms = GetSampleParms() 784 802 self.dataFrame.SetMenuBar(self.dataFrame.BlankMenu) 785 803 self.dataFrame.SetLabel('Sequental refinement results') … … 788 806 Types = len(data['varyList']+atomList.keys())*[wg.GRID_VALUE_FLOAT,] 789 807 seqList = [list(data[name]['variables']) for name in histNames] 808 790 809 for i,item in enumerate(seqList): 791 810 newAtomDict = data[histNames[i]]['newAtomDict'] … … 1122 1141 self.dataFrame.Bind(wx.EVT_MENU, OnAddEquivalence, id=wxID_EQUIVADD) 1123 1142 self.dataFrame.Bind(wx.EVT_MENU, OnAddHold, id=wxID_HOLDADD) 1143 self.dataFrame.Bind(wx.EVT_MENU, OnHelp, id=wxID_HELP) 1124 1144 self.dataDisplay = GSNoteBook(parent=self.dataFrame,size=self.dataFrame.GetClientSize()) 1125 1145 … … 1518 1538 G2plt.PlotPatterns(self) 1519 1539 1540 def OnHelp(event): 1541 Obj = event.GetEventObject() 1542 print 'Help on '+Obj.GetTitle()
Note: See TracChangeset
for help on using the changeset viewer.