Changeset 782
- Timestamp:
- Oct 17, 2012 9:03:11 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIindex.py
r762 r782 559 559 print "%10.3f %3d %3d %10.5f %10.5f %10.5f %10.3f %10.3f %10.3f %10.2f %10.2f" % (M20,X20,Nc,a,b,c,alp,bet,gam,V,V1) 560 560 if M20 >= 2.0: 561 cells.append([M20,X20,ibrav,a,b,c,alp,bet,gam,V,False ])561 cells.append([M20,X20,ibrav,a,b,c,alp,bet,gam,V,False,False]) 562 562 if not GoOn: 563 563 break … … 589 589 return True,dmin,cells 590 590 else: 591 return False,0, 0591 return False,0,[] 592 592 593 593 -
trunk/GSASIIpwdGUI.py
r765 r782 774 774 UpdateInstrumentGrid(G2frame,data) 775 775 776 def OnNewType(event):777 insVal['Type'] = typePick.GetValue()778 data = updateData(insVal,insRef)779 if 'P' in insVal['Type']:780 UpdateInstrumentGrid(G2frame,data)781 782 776 def OnLamPick(event): 783 777 lamType = lamPick.GetValue() … … 845 839 G2frame.dataDisplay = wx.Panel(G2frame.dataFrame) 846 840 instSizer = wx.FlexGridSizer(2,6,5,5) 847 instSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Histogram Type: '),0,wx.ALIGN_CENTER_VERTICAL)841 instSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Histogram Type: '+insVal['Type']),0,wx.ALIGN_CENTER_VERTICAL) 848 842 if 'P' in insVal['Type']: #powder data 849 843 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.InstMenu) … … 856 850 G2frame.Bind(wx.EVT_MENU,OnInstFlagCopy,id=G2gd.wxID_INSTFLAGCOPY) 857 851 G2frame.Bind(wx.EVT_MENU,OnWaveChange,id=G2gd.wxID_CHANGEWAVETYPE) 858 typePick = wx.ComboBox(G2frame.dataDisplay,value=insVal['Type'],859 choices=['PXC','PNC','PNT'],style=wx.CB_READONLY|wx.CB_DROPDOWN)860 typePick.Bind(wx.EVT_COMBOBOX, OnNewType)861 instSizer.Add(typePick,0,wx.ALIGN_CENTER_VERTICAL)862 852 if 'C' in insVal['Type']: #constant wavelength 863 853 #patch … … 954 944 955 945 else: #single crystal data 956 typePick = wx.ComboBox(G2frame.dataDisplay,value=insVal['Type'],957 choices=['SXC','SNC','SNT'],style=wx.CB_READONLY|wx.CB_DROPDOWN)958 typePick.Bind(wx.EVT_COMBOBOX, OnNewType)959 instSizer.Add(typePick,0,wx.ALIGN_CENTER_VERTICAL)960 946 if 'C' in insVal['Type']: #constant wavelength 961 947 instSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Lam: (%10.6f)'%(insDef['Lam'])), … … 1579 1565 PatternId = G2frame.PatternId 1580 1566 print 'Peak Indexing' 1567 keepcells = [] 1581 1568 try: 1582 1569 controls,bravais,cells,dmin = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Unit Cells List')) 1583 cells = [] 1570 for cell in cells: 1571 if cell[11]: 1572 keepcells.append(cell) 1573 except IndexError: 1574 pass 1584 1575 except ValueError: 1585 1576 G2frame.ErrorDialog('Error','Need to set controls in Unit Cell List first') … … 1590 1581 G2frame.dataFrame.CopyCell.Enable(False) 1591 1582 G2frame.dataFrame.RefineCell.Enable(False) 1592 OK,dmin,cells = G2indx.DoIndexPeaks(peaks,inst[1],controls,bravais) 1583 OK,dmin,newcells = G2indx.DoIndexPeaks(peaks,inst[1],controls,bravais) 1584 cells = keepcells+newcells 1593 1585 if OK: 1594 1586 data = [controls,bravais,cells,dmin] … … 1607 1599 G2frame.dataFrame.IndexPeaks.Enable(True) 1608 1600 G2frame.dataFrame.MakeNewPhase.Enable(True) 1609 1601 wx.CallAfter(UpdateUnitCellsGrid,G2frame,data) 1610 1602 1611 1603 def RefreshUnitCellsGrid(event): … … 1629 1621 else: 1630 1622 G2plt.PlotPatterns(G2frame) 1623 elif c == 11: 1624 if UnitCellsTable.GetValue(r,c): 1625 UnitCellsTable.SetValue(r,c,False) 1626 else: 1627 UnitCellsTable.SetValue(r,c,True) 1628 gridDisplay.ForceRefresh() 1631 1629 1632 1630 def MakeNewPhase(event): … … 1741 1739 littleSizer.Add(bravSel,0,wx.ALIGN_CENTER_VERTICAL) 1742 1740 littleSizer.Add(wx.StaticText(G2frame.dataDisplay,label=" Space group "),0,wx.ALIGN_CENTER_VERTICAL) 1741 print controls 1743 1742 spcSel = wx.Choice(G2frame.dataDisplay,choices=SPGlist[controls[5]]) 1744 1743 spcSel.SetSelection(SPGlist[controls[5]].index(controls[13])) … … 1800 1799 wx.StaticText(parent=G2frame.bottom,label=' Indexing Result ') 1801 1800 rowLabels = [] 1802 colLabels = ['M20','X20','use','Bravais','a','b','c','alpha','beta','gamma','Volume' ]1801 colLabels = ['M20','X20','use','Bravais','a','b','c','alpha','beta','gamma','Volume','Keep'] 1803 1802 Types = [wg.GRID_VALUE_FLOAT+':10,2',wg.GRID_VALUE_NUMBER,wg.GRID_VALUE_BOOL,wg.GRID_VALUE_STRING,]+ \ 1804 1803 3*[wg.GRID_VALUE_FLOAT+':10,5',]+3*[wg.GRID_VALUE_FLOAT+':10,3',]+ \ 1805 [wg.GRID_VALUE_FLOAT+':10,2' ]1804 [wg.GRID_VALUE_FLOAT+':10,2',wg.GRID_VALUE_BOOL] 1806 1805 numRows = len(cells) 1807 1806 table = [] 1808 1807 for cell in cells: 1809 1808 rowLabels.append('') 1810 row = cell[0:2]+[cell[-1]]+[bravaisSymb[cell[2]]]+cell[3:1 0]1809 row = cell[0:2]+[cell[-1]]+[bravaisSymb[cell[2]]]+cell[3:11] 1811 1810 if cell[-1]: 1812 1811 A = G2lat.cell2A(cell[3:9]) -
trunk/help/Fit Peaks.htm
r780 r782 23 23 <o:Author>Von Dreele</o:Author> 24 24 <o:LastAuthor>Von Dreele</o:LastAuthor> 25 <o:Revision>2 0</o:Revision>26 <o:TotalTime> 306</o:TotalTime>25 <o:Revision>22</o:Revision> 26 <o:TotalTime>429</o:TotalTime> 27 27 <o:Created>2012-05-05T16:28:00Z</o:Created> 28 <o:LastSaved>2012-10- 05T18:55:00Z</o:LastSaved>29 <o:Pages> 9</o:Pages>30 <o:Words>19 09</o:Words>31 <o:Characters>1 0886</o:Characters>28 <o:LastSaved>2012-10-16T19:18:00Z</o:LastSaved> 29 <o:Pages>2</o:Pages> 30 <o:Words>1952</o:Words> 31 <o:Characters>11133</o:Characters> 32 32 <o:Company>Argonne National Laboratory</o:Company> 33 <o:Lines>9 0</o:Lines>34 <o:Paragraphs>2 5</o:Paragraphs>35 <o:CharactersWithSpaces>1 2770</o:CharactersWithSpaces>33 <o:Lines>92</o:Lines> 34 <o:Paragraphs>26</o:Paragraphs> 35 <o:CharactersWithSpaces>13059</o:CharactersWithSpaces> 36 36 <o:Version>14.00</o:Version> 37 37 </o:DocumentProperties> … … 40 40 </o:OfficeDocumentSettings> 41 41 </xml><![endif]--> 42 <link rel=dataStoreItem href="Fit%20Peaks_files/item00 28.xml"43 target="Fit%20Peaks_files/props0 29.xml">42 <link rel=dataStoreItem href="Fit%20Peaks_files/item0030.xml" 43 target="Fit%20Peaks_files/props031.xml"> 44 44 <link rel=themeData href="Fit%20Peaks_files/themedata.thmx"> 45 45 <link rel=colorSchemeMapping href="Fit%20Peaks_files/colorschememapping.xml"> … … 1417 1417 style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>2.<span 1418 1418 style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>Now 1419 add refinement of the peak positions. This can be done by clicking on all the refinement1420 flags for the individual peaks or it is possible to set them all at the same 1421 t ime using this recipe: </p>1419 add refinement of the peak positions. This can be done by clicking on all the 1420 refinement flags for the individual peaks or it is possible to set them all at 1421 the same time using this recipe: </p> 1422 1422 1423 1423 <p class=MsoListParagraphCxSpMiddle style='margin-left:1.0in;mso-add-space: … … 1480 1480 1481 1481 <p class=MsoListParagraphCxSpFirst>The plot window shows the resolution curves 1482 corresponding to the values of the Gaussian U, V, W, Lorentzian X & Y coefficients;1483 + marks show the individual values based on the sig & gam values for the 1484 peaks in Peak List. Select the refine flag checkbox for Gaussian <b 1485 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif";1482 corresponding to the values of the Gaussian U, V, W, Lorentzian X & Y 1483 coefficients; + marks show the individual values based on the sig & gam 1484 values for the peaks in Peak List. Select the refine flag checkbox for Gaussian 1485 <b style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1486 1486 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-theme-font: 1487 1487 minor-latin'>U</span></b>, <b style='mso-bidi-font-weight:normal'><span … … 1517 1517 src="Fit%20Peaks_files/image012.png" v:shapes="Picture_x0020_11"><![endif]></span></p> 1518 1518 1519 <p class=MsoListParagraphCxSpLast>The <span class=SpellE>Rwp</span> is ~6% as shown1520 on the console window. Again the <b style='mso-bidi-font-weight:normal'><span1519 <p class=MsoListParagraphCxSpLast>The <span class=SpellE>Rwp</span> is ~6% as 1520 shown on the console window. Again the <b style='mso-bidi-font-weight:normal'><span 1521 1521 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin; 1522 1522 mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin'>Peak List</span></b> … … 1817 1817 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin; 1818 1818 mso-hansi-theme-font:minor-latin;mso-bidi-theme-font:minor-latin'>Cancel</span></b> 1819 on the progress bar window. It may take more than one press to fully stop it. 1820 My result was </p> 1819 on the progress bar window. Notice the <b style='mso-bidi-font-weight:normal'>keep</b> 1820 column; this allows you to keep some solutions from one indexing run to the 1821 next. It may take more than one press to fully stop it. My result was </p> 1821 1822 1822 1823 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape 1823 id="Picture_x0020_2 0" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:527.25pt;1824 id="Picture_x0020_24" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:527.25pt; 1824 1825 height:376.5pt;visibility:visible;mso-wrap-style:square'> 1825 1826 <v:imagedata src="Fit%20Peaks_files/image021.png" o:title=""/> 1826 1827 </v:shape><![endif]--><![if !vml]><img border=0 width=703 height=502 1827 src="Fit%20Peaks_files/image021.png" v:shapes="Picture_x0020_20"><![endif]></span></p> 1828 1829 <p class=MsoNormal>Notice an equally good M20 result with twice the volume. The 1830 plot shows every peak indexed including a couple of weak peaks not selected for 1831 the peak fitting.</p> 1828 src="Fit%20Peaks_files/image021.png" v:shapes="Picture_x0020_24"><![endif]></span></p> 1829 1830 <p class=MsoNormal>Notice two equally good M20 results with different volumes; 1831 other solutions may be obtained as you keep trying the indexing. Be sure to use 1832 keep to keep good ones as you try new indexing runs. The best solution is the 1833 one with the smaller volume. The plot shows every peak indexed including a 1834 couple of weak peaks not selected for the peak fitting.</p> 1832 1835 1833 1836 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape -
trunk/help/Fit Peaks_files/filelist.xml
r780 r782 1 1 <xml xmlns:o="urn:schemas-microsoft-com:office:office"> 2 2 <o:MainFile HRef="../Fit%20Peaks.htm"/> 3 <o:File HRef="item00 28.xml"/>4 <o:File HRef="props0 29.xml"/>3 <o:File HRef="item0030.xml"/> 4 <o:File HRef="props031.xml"/> 5 5 <o:File HRef="themedata.thmx"/> 6 6 <o:File HRef="colorschememapping.xml"/>
Note: See TracChangeset
for help on using the changeset viewer.