Changeset 425
- Timestamp:
- Nov 21, 2011 9:32:14 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r420 r425 1505 1505 self.OnFileSave(event) 1506 1506 #works - but it'd be better if it could restore plots 1507 dlg = wx.ProgressDialog('Residual',' wRp =',101.0,1507 dlg = wx.ProgressDialog('Residual','Powder profile Rwp =',101.0, 1508 1508 style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT) 1509 1509 screenSize = wx.ClientDisplayRect() -
trunk/GSASIIgrid.py
r424 r425 86 86 87 87 class MyHelp(wx.Menu): 88 def __init__(self,title='' ):88 def __init__(self,title='',helpType='this item'): 89 89 wx.Menu.__init__(self,title) 90 self.Append(help='Help on this item',id=wxID_HELP, kind=wx.ITEM_NORMAL, 90 self.helpType = helpType #there must be some way to get this 91 self.Append(help='Help on '+helpType,id=wxID_HELP, kind=wx.ITEM_NORMAL, 91 92 text='Help') 92 93 … … 97 98 def _init_coll_AtomsMenu(self,parent): 98 99 parent.Append(menu=self.AtomEdit, title='Edit') 99 parent.Append(menu=MyHelp( ),title='Help')100 parent.Append(menu=MyHelp(helpType='Atoms'),title='Help') 100 101 101 102 def _init_coll_ConstraintMenu(self,parent): 102 103 parent.Append(menu=self.ConstraintEdit, title='Edit') 103 parent.Append(menu=MyHelp( ),title='Help')104 parent.Append(menu=MyHelp(helpType='Constraints'),title='Help') 104 105 105 106 def _init_coll_RestraintMenu(self,parent): 106 107 parent.Append(menu=self.RestraintEdit, title='Edit') 107 parent.Append(menu=MyHelp( ),title='Help')108 parent.Append(menu=MyHelp(helpType='Restraints'),title='Help') 108 109 109 110 def _init_coll_DataMenu(self,parent): 110 111 parent.Append(menu=self.DataEdit, title='Edit') 111 parent.Append(menu=MyHelp( ),title='Help')112 parent.Append(menu=MyHelp(helpType='Data'),title='Help') 112 113 113 114 def _init_coll_DrawAtomsMenu(self,parent): 114 115 parent.Append(menu=self.DrawAtomEdit, title='Edit') 115 parent.Append(menu=MyHelp( ),title='Help')116 parent.Append(menu=MyHelp(helpType='Draw Atoms'),title='Help') 116 117 117 118 def _init_coll_PawleyMenu(self,parent): 118 119 parent.Append(menu=self.PawleyEdit,title='Operations') 119 parent.Append(menu=MyHelp( ),title='Help')120 parent.Append(menu=MyHelp(helpType='Pawley'),title='Help') 120 121 121 122 def _init_coll_IndPeaksMenu(self,parent): 122 123 parent.Append(menu=self.IndPeaksEdit,title='Operations') 123 parent.Append(menu=MyHelp( ),title='Help')124 parent.Append(menu=MyHelp(helpType='Index Peaks'),title='Help') 124 125 125 126 def _init_coll_ImageMenu(self,parent): 126 127 parent.Append(menu=self.ImageEdit, title='Operations') 127 parent.Append(menu=MyHelp( ),title='Help')128 parent.Append(menu=MyHelp(helpType='Images'),title='Help') 128 129 129 130 def _init_coll_BackMenu(self,parent): 130 131 parent.Append(menu=self.BackEdit, title='File') 131 parent.Append(menu=MyHelp( ),title='Help')132 parent.Append(menu=MyHelp(helpType='Background'),title='Help') 132 133 133 134 def _init_coll_LimitMenu(self,parent): 134 135 parent.Append(menu=self.LimitEdit, title='File') 135 parent.Append(menu=MyHelp( ),title='Help')136 parent.Append(menu=MyHelp(helpType='Limits'),title='Help') 136 137 137 138 def _init_coll_InstMenu(self,parent): 138 139 parent.Append(menu=self.InstEdit, title='Operations') 139 parent.Append(menu=MyHelp( ),title='Help')140 parent.Append(menu=MyHelp(helpType='Instrument Parameters'),title='Help') 140 141 141 142 def _init_coll_MaskMenu(self,parent): 142 143 parent.Append(menu=self.MaskEdit, title='Operations') 143 parent.Append(menu=MyHelp( ),title='Help')144 parent.Append(menu=MyHelp(helpType='Image Masks'),title='Help') 144 145 145 146 def _init_coll_SampleMenu(self,parent): 146 147 parent.Append(menu=self.SampleEdit, title='File') 147 parent.Append(menu=MyHelp( ),title='Help')148 parent.Append(menu=MyHelp(helpType='Sample Parameters'),title='Help') 148 149 149 150 def _init_coll_PeakMenu(self,parent): 150 151 parent.Append(menu=self.PeakEdit, title='Peak Fitting') 151 parent.Append(menu=MyHelp( ),title='Help')152 parent.Append(menu=MyHelp(helpType='Powder Peaks'),title='Help') 152 153 153 154 def _init_coll_IndexMenu(self,parent): 154 155 parent.Append(menu=self.IndexEdit, title='Cell Index/Refine') 155 parent.Append(menu=MyHelp( ),title='Help')156 parent.Append(menu=MyHelp(helpType='Cell Indexing/Refine'),title='Help') 156 157 157 158 def _init_coll_ReflMenu(self,parent): 158 159 parent.Append(menu=self.ReflEdit, title='Reflection List') 159 parent.Append(menu=MyHelp( ),title='Help')160 parent.Append(menu=MyHelp(helpType='Reflection List'),title='Help') 160 161 161 162 def _init_coll_TextureMenu(self,parent): 162 163 parent.Append(menu=self.TextureEdit, title='Texture') 163 parent.Append(menu=MyHelp( ),title='Help')164 parent.Append(menu=MyHelp(helpType='Texture'),title='Help') 164 165 165 166 def _init_coll_PDFMenu(self,parent): 166 167 parent.Append(menu=self.PDFEdit, title='PDF Controls') 167 parent.Append(menu=MyHelp( ),title='Help')168 parent.Append(menu=MyHelp(helpType='PDF Controls'),title='Help') 168 169 169 170 def _init_coll_Atom_Items(self,parent): … … 677 678 if 'All' in names: 678 679 names = choices[1:] 679 680 data['Seq Data'] = names 680 681 dlg.Destroy() 681 data['Seq Data'] = names682 682 reverseSel.Enable(True) 683 683 … … 795 795 if colLabels[parm] in atomList: 796 796 sigData.append(sigList[colLabels.index(atomList[colLabels[parm]])]) 797 elif colLabels[parm] in cellList: 798 sigData.append(sigList[colLabels.index(cellList[colLabels[parm]])]) 797 799 else: 798 800 sigData.append(sigList[parm]) … … 818 820 if self.dataDisplay: 819 821 self.dataDisplay.Destroy() 822 cellList = {} 823 newCellDict = data[histNames[0]]['newCellDict'] 824 for item in newCellDict: 825 if item in data['varyList']: 826 cellList[newCellDict[item][0]] = item 820 827 atomList = {} 821 828 newAtomDict = data[histNames[0]]['newAtomDict'] … … 827 834 self.dataFrame.SetLabel('Sequental refinement results') 828 835 self.dataFrame.CreateStatusBar() 829 colLabels = data['varyList']+atomList.keys() 830 Types = len(data['varyList']+atomList.keys() )*[wg.GRID_VALUE_FLOAT,]836 colLabels = data['varyList']+atomList.keys()+cellList.keys() 837 Types = len(data['varyList']+atomList.keys()+cellList.keys())*[wg.GRID_VALUE_FLOAT,] 831 838 seqList = [list(data[name]['variables']) for name in histNames] 832 839 833 840 for i,item in enumerate(seqList): 834 841 newAtomDict = data[histNames[i]]['newAtomDict'] 842 newCellDict = data[histNames[i]]['newCellDict'] 835 843 item += [newAtomDict[atomList[parm]][1] for parm in atomList.keys()] 844 item += [newCellDict[cellList[parm]][1] for parm in cellList.keys()] 836 845 self.SeqTable = Table(seqList,colLabels=colLabels,rowLabels=histNames,types=Types) 837 846 self.dataDisplay = GSGrid(parent=self.dataFrame) … … 1568 1577 for child in Obj.GetChildren(): 1569 1578 if 'NoteBook' in str(type(child)): 1570 page = child.GetCurrentPage() 1571 notebook = page.GetParent() 1572 num = notebook.GetSelection() 1573 line = 'Help on '+notebook.GetPageText(num) 1579 notebook = child.GetCurrentPage().GetParent() 1580 line = 'Help on '+notebook.GetPageText(notebook.GetSelection()) 1574 1581 print line 1575 1582 print 'Real help will come here as HTML pages' -
trunk/GSASIImapvars.py
r421 r425 565 565 if name not in varyList: continue # if independent var not varied 566 566 for m,v in zip(invmultarr[:,i],varlist): 567 print 'add derv',v,'*',m,'to derv',name567 # print 'add derv',v,'*',m,'to derv',name 568 568 if m == 0: continue 569 569 dMdv[varyList.index(name)] += m * derivDict[v] -
trunk/GSASIIstruct.py
r424 r425 1723 1723 newCellDict = {} 1724 1724 Ddict = dict(zip(['D11','D22','D33','D12','D13','D23'],['A'+str(i) for i in range(6)])) 1725 Adict = dict(zip(['A'+str(i) for i in range(6)],['D11','D22','D33','D12','D13','D23']))1726 1725 for item in varyList: 1727 1726 keys = item.split(':') 1728 1727 if keys[2] in Ddict: 1729 key = keys[0]+':'+keys[1]+':'+Ddict[keys[2]] 1730 newCellDict[key] = parmDict[key]+parmDict[item] 1731 elif keys[2] in Adict: 1732 newCellDict[key] = parmDict[item] 1733 1734 1735 1728 key = keys[0]+'::'+Ddict[keys[2]] 1729 parm = keys[0]+'::'+keys[2] 1730 newCellDict[parm] = [key,parmDict[key]+parmDict[item]] 1736 1731 return newCellDict 1737 1732 … … 2472 2467 Rwp = min(100.,np.sqrt(np.sum(M**2)/sumwYo)*100.) 2473 2468 if dlg: 2474 GoOn = dlg.Update(Rwp,newmsg='%s%8.3f%s'%(' wRp =',Rwp,'%'))[0]2469 GoOn = dlg.Update(Rwp,newmsg='%s%8.3f%s'%('Powder profile Rwp =',Rwp,'%'))[0] 2475 2470 if not GoOn: 2476 2471 parmDict['saved values'] = values … … 2552 2547 Values2Dict(parmDict, varyList, result[0]) 2553 2548 G2mv.Dict2Map(parmDict,varyList) 2554 newCellDict = GetNewCellParms(parmDict,varyList)2555 newAtomDict = ApplyXYZshifts(parmDict,varyList)2556 2549 2557 2550 Rwp = np.sqrt(chisq/Histograms['sumwYo'])*100. #to % … … 2588 2581 # print 'test2' 2589 2582 sigDict = dict(zip(varyList,sig)) 2583 newCellDict = GetNewCellParms(parmDict,varyList) 2584 print newCellDict 2585 newAtomDict = ApplyXYZshifts(parmDict,varyList) 2590 2586 covData = {'variables':result[0],'varyList':varyList,'sig':sig, 2591 2587 'covMatrix':covMatrix,'title':GPXfile,'newAtomDict':newAtomDict,'newCellDict':newCellDict} … … 2705 2701 Values2Dict(parmDict, varyList, result[0]) 2706 2702 G2mv.Dict2Map(parmDict,varyList) 2707 newCellDict = GetNewCellParms(parmDict,varyList)2708 newAtomDict = ApplyXYZshifts(parmDict,varyList)2709 2703 2710 2704 Rwp = np.sqrt(chisq/Histo['sumwYo'])*100. #to % … … 2733 2727 GetFobsSq(Histo,Phases,parmDict,calcControls) 2734 2728 sigDict = dict(zip(varyList,sig)) 2729 newCellDict = GetNewCellParms(parmDict,varyList) 2730 newAtomDict = ApplyXYZshifts(parmDict,varyList) 2735 2731 covData = {'variables':result[0],'varyList':varyList,'sig':sig, 2736 2732 'covMatrix':covMatrix,'title':histogram,'newAtomDict':newAtomDict,'newCellDict':newCellDict}
Note: See TracChangeset
for help on using the changeset viewer.