Changeset 1260
- Timestamp:
- Mar 21, 2014 10:34:51 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwdGUI.py
r1253 r1260 704 704 G2frame.Bind(wx.EVT_MENU,OnAddExcl,id=G2gd.wxID_ADDEXCLREGION) 705 705 G2frame.dataDisplay = G2gd.GSGrid(parent=G2frame.dataFrame) 706 G2frame.dataDisplay.SetTable(G2frame.LimitsTable, True) 706 G2frame.dataDisplay.SetTable(G2frame.LimitsTable, True) 707 G2frame.dataDisplay.SetCellStyle(0,0,VERY_LIGHT_GREY,True) 708 G2frame.dataDisplay.SetCellStyle(0,1,VERY_LIGHT_GREY,True) 707 709 G2frame.dataDisplay.Bind(wg.EVT_GRID_CELL_CHANGE, RefreshLimitsGrid) 708 710 G2frame.dataDisplay.Bind(wx.EVT_KEY_DOWN, KeyEditPeakGrid) … … 710 712 G2frame.dataDisplay.AutoSizeColumns(False) 711 713 G2frame.dataFrame.setSizePosLeft([230,260]) 714 712 715 713 716 ################################################################################ … … 2526 2529 except ValueError: 2527 2530 value = item[ind] 2528 2531 Obj.SetValue(str(value)) 2529 2532 item[ind] = value 2530 2533 … … 2560 2563 minDias = ['10','25','50','100','150','200'] 2561 2564 mindiam = wx.ComboBox(G2frame.dataDisplay,value=str(data['Size']['MinDiam']),choices=minDias, 2562 style=wx.CB_READONLY|wx.CB_DROPDOWN) 2563 mindiam.Bind(wx.EVT_COMBOBOX,OnIntVal) 2565 style=wx.CB_DROPDOWN) 2566 mindiam.Bind(wx.EVT_TEXT_ENTER,OnIntVal) 2567 mindiam.Bind(wx.EVT_KILL_FOCUS,OnIntVal) 2564 2568 Indx[mindiam.GetId()] = [data['Size'],'MinDiam',0] 2565 2569 binSizer.Add(mindiam,0,WACV) … … 2568 2572 maxdiam = wx.ComboBox(G2frame.dataDisplay,value=str(data['Size']['MaxDiam']),choices=maxDias, 2569 2573 style=wx.CB_DROPDOWN) 2570 maxdiam.Bind(wx.EVT_COMBOBOX,OnIntVal) 2574 maxdiam.Bind(wx.EVT_TEXT_ENTER,OnIntVal) 2575 maxdiam.Bind(wx.EVT_KILL_FOCUS,OnIntVal) 2571 2576 Indx[maxdiam.GetId()] = [data['Size'],'MaxDiam',0] 2572 2577 binSizer.Add(maxdiam,0,WACV) -
trunk/GSASIIsasd.py
r1253 r1260 760 760 BinsBack = np.ones_like(Bins)*Sky*Scale/Contrast 761 761 Back = data['Back'] 762 Q,Io,wt,Ic,Ib = Profile 762 Q,Io,wt,Ic,Ib = Profile[:5] 763 763 Qmin = Limits[1][0] 764 764 Qmax = Limits[1][1] -
trunk/help/Small Angle Size Distribution.htm
r1258 r1260 25 25 <o:Author>Von Dreele</o:Author> 26 26 <o:LastAuthor>Von Dreele</o:LastAuthor> 27 <o:Revision> 7</o:Revision>28 <o:TotalTime>186 5</o:TotalTime>27 <o:Revision>8</o:Revision> 28 <o:TotalTime>1868</o:TotalTime> 29 29 <o:Created>2014-03-20T16:54:00Z</o:Created> 30 <o:LastSaved>2014-03-2 0T21:31:00Z</o:LastSaved>30 <o:LastSaved>2014-03-21T15:25:00Z</o:LastSaved> 31 31 <o:Pages>6</o:Pages> 32 <o:Words>126 7</o:Words>33 <o:Characters>72 25</o:Characters>32 <o:Words>1265</o:Words> 33 <o:Characters>7212</o:Characters> 34 34 <o:Company>Argonne National Laboratory</o:Company> 35 35 <o:Lines>60</o:Lines> 36 36 <o:Paragraphs>16</o:Paragraphs> 37 <o:CharactersWithSpaces>84 76</o:CharactersWithSpaces>37 <o:CharactersWithSpaces>8461</o:CharactersWithSpaces> 38 38 <o:Version>14.00</o:Version> 39 39 </o:DocumentProperties> … … 779 779 /* List Definitions */ 780 780 @list l0 781 {mso-list-id: 72943423;781 {mso-list-id:608973138; 782 782 mso-list-type:hybrid; 783 mso-list-template-ids: 59682855267698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}783 mso-list-template-ids:-1449999034 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} 784 784 @list l0:level1 785 785 {mso-level-tab-stop:none; … … 824 824 mso-level-number-position:right; 825 825 text-indent:-9.0pt;} 826 @list l1827 {mso-list-id:224948912;828 mso-list-type:hybrid;829 mso-list-template-ids:1354009666 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}830 @list l1:level1831 {mso-level-tab-stop:none;832 mso-level-number-position:left;833 text-indent:-.25in;}834 @list l1:level2835 {mso-level-number-format:alpha-lower;836 mso-level-tab-stop:none;837 mso-level-number-position:left;838 text-indent:-.25in;}839 @list l1:level3840 {mso-level-number-format:roman-lower;841 mso-level-tab-stop:none;842 mso-level-number-position:right;843 text-indent:-9.0pt;}844 @list l1:level4845 {mso-level-tab-stop:none;846 mso-level-number-position:left;847 text-indent:-.25in;}848 @list l1:level5849 {mso-level-number-format:alpha-lower;850 mso-level-tab-stop:none;851 mso-level-number-position:left;852 text-indent:-.25in;}853 @list l1:level6854 {mso-level-number-format:roman-lower;855 mso-level-tab-stop:none;856 mso-level-number-position:right;857 text-indent:-9.0pt;}858 @list l1:level7859 {mso-level-tab-stop:none;860 mso-level-number-position:left;861 text-indent:-.25in;}862 @list l1:level8863 {mso-level-number-format:alpha-lower;864 mso-level-tab-stop:none;865 mso-level-number-position:left;866 text-indent:-.25in;}867 @list l1:level9868 {mso-level-number-format:roman-lower;869 mso-level-tab-stop:none;870 mso-level-number-position:right;871 text-indent:-9.0pt;}872 @list l2873 {mso-list-id:608973138;874 mso-list-type:hybrid;875 mso-list-template-ids:-1449999034 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}876 @list l2:level1877 {mso-level-tab-stop:none;878 mso-level-number-position:left;879 text-indent:-.25in;}880 @list l2:level2881 {mso-level-number-format:alpha-lower;882 mso-level-tab-stop:none;883 mso-level-number-position:left;884 text-indent:-.25in;}885 @list l2:level3886 {mso-level-number-format:roman-lower;887 mso-level-tab-stop:none;888 mso-level-number-position:right;889 text-indent:-9.0pt;}890 @list l2:level4891 {mso-level-tab-stop:none;892 mso-level-number-position:left;893 text-indent:-.25in;}894 @list l2:level5895 {mso-level-number-format:alpha-lower;896 mso-level-tab-stop:none;897 mso-level-number-position:left;898 text-indent:-.25in;}899 @list l2:level6900 {mso-level-number-format:roman-lower;901 mso-level-tab-stop:none;902 mso-level-number-position:right;903 text-indent:-9.0pt;}904 @list l2:level7905 {mso-level-tab-stop:none;906 mso-level-number-position:left;907 text-indent:-.25in;}908 @list l2:level8909 {mso-level-number-format:alpha-lower;910 mso-level-tab-stop:none;911 mso-level-number-position:left;912 text-indent:-.25in;}913 @list l2:level9914 {mso-level-number-format:roman-lower;915 mso-level-tab-stop:none;916 mso-level-number-position:right;917 text-indent:-9.0pt;}918 826 ol 919 827 {margin-bottom:0in;} … … 975 883 <div class=WordSection1> 976 884 977 <h1><strong><span style='mso-bidi-font-weight:normal'>Small Angle X-Ray Data Size978 Distribution in Alumina Powder</span><o:p></o:p></strong></h1>885 <h1><strong><span style='mso-bidi-font-weight:normal'>Small Angle X-Ray Data 886 Size Distribution in Alumina Powder</span><o:p></o:p></strong></h1> 979 887 980 888 <p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'>In 981 889 this tutorial you will determine the size distribution of particles in an 982 alumina polishing powder using data from a constant wavelength synchrotron 983 X-rayUSAXS instrument. You will use both Maximum Entropy (<span class=SpellE>MaxEnt</span>)890 alumina polishing powder using data from a constant wavelength synchrotron X-ray 891 USAXS instrument. You will use both Maximum Entropy (<span class=SpellE>MaxEnt</span>) 984 892 and Total Non-Negative Least Squares (TNNLS) methods assuming spherical 985 893 particles. The data were collected from <span style='mso-fareast-font-family: … … 997 905 <h2>Step 1: read in the data file</h2> 998 906 999 <p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l 2level1 lfo2'><![if !supportLists]><span907 <p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span 1000 908 style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>1.<span 1001 909 style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>Use … … 1004 912 Calibri;mso-bidi-theme-font:minor-latin'>Import/Small Angle Data/from a q step 1005 913 QIE data file</span></b> menu item to read the data file into GSAS-II. This 1006 read option is set to read three column small angle scattering data (SASD) as Q,1007 intensity and estimated standard deviation in intensity; <span class=GramE>There</span>914 read option is set to read three column small angle scattering data (SASD) as 915 Q, intensity and estimated standard deviation in intensity; <span class=GramE>There</span> 1008 916 may be a header with metadata information in the front of this file.<span 1009 917 style='mso-spacerun:yes'> </span>Change the file directory to <b … … 1015 923 minor-latin'> to find the file.</span></p> 1016 924 1017 <p class=MsoListParagraphCxSpLast style='text-indent:-.25in;mso-list:l 2level1 lfo2'><![if !supportLists]><span925 <p class=MsoListParagraphCxSpLast style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span 1018 926 style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>2.<span 1019 927 style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>Select … … 1076 984 1077 985 <p class=MsoNormal>For this step we will reposition the limits to enclose only 1078 that part of the SASD pattern suitable for size distribution analysis. Typically1079 this covers 10<sup>-3</sup> < Q < 10<sup>-1</sup>; below this range scattering 1080 is from very large objects not readily described by the size distribution 1081 analysis and above the scattering is mostly background. Select <b986 that part of the SASD pattern suitable for size distribution analysis. 987 Typically this covers 10<sup>-3</sup> < Q < 10<sup>-1</sup>; below this 988 range scattering is from very large objects not readily described by the size 989 distribution analysis and above the scattering is mostly background. Select <b 1082 990 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1083 991 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Limits</span></b> … … 1122 1030 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin; 1123 1031 mso-hansi-theme-font:minor-latin;mso-no-proof:yes'>UserSubstances.py</span></b><span 1124 style='mso-no-proof:yes'>; this is read after Substances.py when you load substances1125 for your selection. </span>Select <b style='mso-bidi-font-weight:normal'><span 1126 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin; 1127 m so-hansi-theme-font:minor-latin'>Substances</span></b> under <b1032 style='mso-no-proof:yes'>; this is read after Substances.py when you load 1033 substances for your selection. </span>Select <b style='mso-bidi-font-weight: 1034 normal'><span style='font-family:"Calibri","sans-serif";mso-ascii-theme-font: 1035 minor-latin;mso-hansi-theme-font:minor-latin'>Substances</span></b> under <b 1128 1036 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1129 1037 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>SASD alumina … … 1163 1071 <p class=MsoNormal>If desired you can load/add as many substances as you desire 1164 1072 into this list; you can also delete any of them (except vacuum). The 1165 composition, volume occupied by the atoms in the composition and the density are1166 given for each substance. These can each be edited; the other values will change 1167 accordingly. If your substance isnt in the list, you can <b style='mso-bidi-font-weight: 1168 normal'><span style='font-family:"Calibri","sans-serif";mso-ascii-theme-font: 1169 m inor-latin;mso-hansi-theme-font:minor-latin'>Edit/Add substance</span></b> to1170 create a new one (you will be asked for a name and the set of elements in two successive1171 popup windows). From this information the scattering density and that as 1172 affected by resonant scattering for the listed wavelength is displayed (the 1173 wavelength can be changed in the <b style='mso-bidi-font-weight:normal'><span1174 style=' font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;1175 mso- hansi-theme-font:minor-latin'>Instrument Parameters</span></b> GSAS-II tree1176 item if needed). The resonant scattering value is used for contrast 1177 calculations.</p>1073 composition, volume occupied by the atoms in the composition and the density 1074 are given for each substance. These can each be edited; the other values will 1075 change accordingly. If your substance isnt in the list, you can <b 1076 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1077 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Edit/Add 1078 substance</span></b> to create a new one (you will be asked for a name and the 1079 set of elements in two successive popup windows). From this information the 1080 scattering density and that as affected by resonant scattering for the listed 1081 wavelength is displayed (the wavelength can be changed in the <b 1082 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1083 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Instrument 1084 Parameters</span></b> GSAS-II tree item if needed). The resonant scattering 1085 value is used for contrast calculations.</p> 1178 1086 1179 1087 <h2>Step 4: Set Sample parameters </h2> … … 1223 1131 <h2>Step 5 Size distribution via Maximum Entropy</h2> 1224 1132 1225 <p class=MsoNormal>You are now ready to attempt a size distribution analysis using1226 the maximum entropy method. Select <b style='mso-bidi-font-weight:normal'><span1133 <p class=MsoNormal>You are now ready to attempt a size distribution analysis 1134 using the maximum entropy method. Select <b style='mso-bidi-font-weight:normal'><span 1227 1135 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin; 1228 1136 mso-hansi-theme-font:minor-latin'>Models</span></b> under <b style='mso-bidi-font-weight: … … 1232 1140 1233 1141 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape 1234 id="Picture_x0020_ 26" o:spid="_x0000_i1033" type="#_x0000_t75" style='width:355.5pt;1142 id="Picture_x0020_15" o:spid="_x0000_i1033" type="#_x0000_t75" style='width:355.5pt; 1235 1143 height:191.25pt;visibility:visible;mso-wrap-style:square'> 1236 1144 <v:imagedata src="Small%20Angle%20Size%20Distribution_files/image006.png" 1237 1145 o:title=""/> 1238 1146 </v:shape><![endif]--><![if !vml]><img border=0 width=474 height=255 1239 src="Small%20Angle%20Size%20Distribution_files/image006.png" v:shapes="Picture_x0020_ 26"><![endif]></span></p>1147 src="Small%20Angle%20Size%20Distribution_files/image006.png" v:shapes="Picture_x0020_15"><![endif]></span></p> 1240 1148 1241 1149 <p class=MsoNormal><o:p> </o:p></p> … … 1337 1245 make this determination.</p> 1338 1246 1339 <h2>Step 6 Size Distribution <i style='mso-bidi-font-style:normal'>via</i> Total1340 Non-Negative Least Squares (TNNLS)</h2>1247 <h2>Step 6 Size Distribution <i style='mso-bidi-font-style:normal'>via</i> 1248 Total Non-Negative Least Squares (TNNLS)</h2> 1341 1249 1342 1250 <p class=MsoNormal>An alternative method for determining size distributions is … … 1347 1255 minor-latin;mso-hansi-theme-font:minor-latin'>IPG</span></b> from the <b 1348 1256 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1349 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Fitting method</span></b>1350 pull down. The data window will change to give</p>1257 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Fitting 1258 method</span></b> pull down. The data window will change to give</p> 1351 1259 1352 1260 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape 1353 id="Picture_x0020_ 288" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:375.75pt;1261 id="Picture_x0020_16" o:spid="_x0000_i1028" type="#_x0000_t75" style='width:375.75pt; 1354 1262 height:191.25pt;visibility:visible;mso-wrap-style:square'> 1355 1263 <v:imagedata src="Small%20Angle%20Size%20Distribution_files/image011.png" 1356 1264 o:title=""/> 1357 1265 </v:shape><![endif]--><![if !vml]><img border=0 width=501 height=255 1358 src="Small%20Angle%20Size%20Distribution_files/image011.png" v:shapes="Picture_x0020_ 288"><![endif]></span></p>1266 src="Small%20Angle%20Size%20Distribution_files/image011.png" v:shapes="Picture_x0020_16"><![endif]></span></p> 1359 1267 1360 1268 <p class=MsoNormal><o:p> </o:p></p> 1361 1269 1362 1270 <p class=MsoNormal>Reset the Error multiplier back to 1.0 and then do 1363 Models/Fit to run the IPG fitting. The IPG algorithm did not converge in 100 1364 cycles and resulting size distribution is a little choppy but has roughly the1365 samebimodal distribution found by <span class=SpellE>MaxEnt</span>.</p>1271 Models/Fit to run the IPG fitting. The IPG algorithm did not converge in 100 cycles 1272 and resulting size distribution is a little choppy but has roughly the same 1273 bimodal distribution found by <span class=SpellE>MaxEnt</span>.</p> 1366 1274 1367 1275 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape … … 1377 1285 <p class=MsoNormal>This can be considerably improved by setting the <b 1378 1286 style='mso-bidi-font-weight:normal'><span style='font-family:"Calibri","sans-serif"; 1379 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Error 1380 multiplier</span></b> to 2.0; the IPG fit con<span style='mso-no-proof:yes'>verges1381 in <20 cyclesand gives a smoother size distribution.<o:p></o:p></span></p>1287 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>Error multiplier</span></b> 1288 to 2.0; the IPG fit con<span style='mso-no-proof:yes'>verges in <20 cycles 1289 and gives a smoother size distribution.<o:p></o:p></span></p> 1382 1290 1383 1291 <p class=MsoNormal><span style='mso-no-proof:yes'><!--[if gte vml 1]><v:shape … … 1425 1333 mso-ascii-theme-font:minor-latin;mso-hansi-theme-font:minor-latin'>2.0</span></b>.</p> 1426 1334 1427 <p class=MsoNormal>You should save this GSAS-II project as it will be used in (future)1428 tutorials for Particle fit and Unified fit <span class=SpellE>modelling</span>;1335 <p class=MsoNormal>You should save this GSAS-II project as it will be used in 1336 (future) tutorials for Particle fit and Unified fit <span class=SpellE>modelling</span>; 1429 1337 I used <span class=SpellE><b style='mso-bidi-font-weight:normal'><span 1430 1338 style='font-family:"Calibri","sans-serif";mso-ascii-theme-font:minor-latin;
Note: See TracChangeset
for help on using the changeset viewer.