source: sasview/sansmodels/src/media/smear_computation.html @ 0f8f831

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 0f8f831 was 50764a4, checked in by Jae Cho <jhjcho@…>, 14 years ago

added polydispersity documentation

  • Property mode set to 100644
File size: 18.8 KB
Line 
1<html>
2
3<head>
4<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
5<meta name=Generator content="Microsoft Word 12 (filtered)">
6<style>
7<!--
8 /* Font Definitions */
9 @font-face
10        {font-family:Wingdings;
11        panose-1:5 0 0 0 0 0 0 0 0 0;}
12@font-face
13        {font-family:"Cambria Math";
14        panose-1:2 4 5 3 5 4 6 3 2 4;}
15@font-face
16        {font-family:Calibri;
17        panose-1:2 15 5 2 2 2 4 3 2 4;}
18@font-face
19        {font-family:Tahoma;
20        panose-1:2 11 6 4 3 5 4 4 2 4;}
21 /* Style Definitions */
22 p.MsoNormal, li.MsoNormal, div.MsoNormal
23        {margin-top:0in;
24        margin-right:0in;
25        margin-bottom:10.0pt;
26        margin-left:0in;
27        line-height:115%;
28        font-size:11.0pt;
29        font-family:"Calibri","sans-serif";}
30p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
31        {mso-style-link:"Balloon Text Char";
32        margin:0in;
33        margin-bottom:.0001pt;
34        font-size:8.0pt;
35        font-family:"Tahoma","sans-serif";}
36p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
37        {margin-top:0in;
38        margin-right:0in;
39        margin-bottom:10.0pt;
40        margin-left:.5in;
41        line-height:115%;
42        font-size:11.0pt;
43        font-family:"Calibri","sans-serif";}
44p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
45        {margin-top:0in;
46        margin-right:0in;
47        margin-bottom:0in;
48        margin-left:.5in;
49        margin-bottom:.0001pt;
50        line-height:115%;
51        font-size:11.0pt;
52        font-family:"Calibri","sans-serif";}
53p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
54        {margin-top:0in;
55        margin-right:0in;
56        margin-bottom:0in;
57        margin-left:.5in;
58        margin-bottom:.0001pt;
59        line-height:115%;
60        font-size:11.0pt;
61        font-family:"Calibri","sans-serif";}
62p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
63        {margin-top:0in;
64        margin-right:0in;
65        margin-bottom:10.0pt;
66        margin-left:.5in;
67        line-height:115%;
68        font-size:11.0pt;
69        font-family:"Calibri","sans-serif";}
70span.BalloonTextChar
71        {mso-style-name:"Balloon Text Char";
72        mso-style-link:"Balloon Text";
73        font-family:"Tahoma","sans-serif";}
74.MsoPapDefault
75        {margin-bottom:10.0pt;
76        line-height:115%;}
77@page WordSection1
78        {size:8.5in 11.0in;
79        margin:1.0in 1.0in 1.0in 1.0in;}
80div.WordSection1
81        {page:WordSection1;}
82 /* List Definitions */
83 ol
84        {margin-bottom:0in;}
85ul
86        {margin-bottom:0in;}
87-->
88</style>
89
90</head>
91
92<body lang=EN-US>
93
94<div class=WordSection1>
95
96<p class=MsoNormal><span style='font-size:16.0pt;line-height:115%;font-family:
97"Times New Roman","serif"'><h4>Smear Computation </h4></span></p>
98<p class=MsoNormal>&nbsp;</p>
99
100<ul style='margin-top:0in' type=disc>
101 <li class=MsoNormal style='line-height:115%'><a href="#Slit Smear"><b>Slit Smear</b></a>
102     </li>
103 <li class=MsoNormal style='line-height:115%'><a href="#Pinhole Smear"><b>Pinhole Smear</b></a>
104        </li>
105 <li class=MsoNormal style='line-height:115%'><a href="#2D Smear"><b>2D Smear</b></a> 
106        </li>
107</ul>
108<p class=MsoNormal>&nbsp;</p>
109<p class=MsoNormal>&nbsp;</p>
110<p class=MsoListParagraph><span style='font-size:14.0pt;line-height:115%;
111font-family:"Times New Roman","serif"'><h5><a name="Slit Smear">Slit Smear</a></h5></span></p>
112
113<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The sit
114smeared scattering intensity for SANS is defined by</span></p>
115
116<p class=MsoNormal><img width=349 height=49
117src="sm_image002.gif" align=left hspace=12></p>
118
119<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>           
120                                 1)</span><br clear=all>
121<span style='font-family:"Times New Roman","serif"'>where Norm = <span
122style='position:relative;top:15.0pt'><img width=137 height=49
123src="sm_image003.gif"></span>.</span></p>
124
125<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
126functions <span style='position:relative;top:6.0pt'><img width=43 height=25
127src="sm_image004.gif"></span>and <span style='position:
128relative;top:6.0pt'><img width=43 height=25
129src="sm_image005.gif"></span>refer to the slit width weighting
130function and the slit height weighting determined at the q point, respectively.
131 Here, we assumes that the weighting function is described by a rectangular
132function, i.e.,</span></p>
133
134<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=134
135height=26 src="sm_image006.gif">                                                                                                       
136  </span><span style='font-family:"Times New Roman","serif";position:relative;
137top:7.0pt'>2)</span></p>
138
139<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>and </span></p>
140
141<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=136
142height=26 src="sm_image007.gif"></span>,                                                                              
143                         <span style='font-family:"Times New Roman","serif"'>3)</span></p>
144
145<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>so that </span><span
146style='position:relative;top:6.0pt'><img width=58 height=23
147src="sm_image008.gif"></span> <span style='position:relative;
148top:16.0pt'><img width=76 height=51 src="sm_image009.gif"></span> <span
149style='font-family:"Times New Roman","serif"'>for</span>  <span
150style='position:relative;top:3.0pt'><img width=40 height=15
151src="sm_image010.gif"></span> <span style='font-family:
152"Times New Roman","serif"'>and <i>u</i>. The </span><span style='position:relative;
153top:6.0pt'><img width=28 height=24 src="sm_image011.gif"></span> <span
154style='font-family:"Times New Roman","serif"'>and </span><span
155style='position:relative;top:6.0pt'><img width=28 height=24
156src="sm_image012.gif"> </span><span style='font-family:
157"Times New Roman","serif"'>stand for the slit height (FWHM/2) and the slit
158width (FWHM/2) in the q space. Now the integral of Eq. (1) is simplified to</span></p>
159
160<p class=MsoNormal><img width=283 height=52
161src="sm_image013.gif" align=left hspace=12><span
162style='font-family:"Times New Roman","serif"'>                                                  
163         4)</span></p>
164
165<p class=MsoNormal><span style='font-family:"Times New Roman","serif";
166position:relative;top:20.0pt'>&nbsp;</span></p>
167
168<p class=MsoListParagraphCxSpFirst style='margin-left:0in'><b><span
169style='font-family:"Times New Roman","serif"'>Numerical Implementation of Eq.
170(4) </span></b></p>
171
172<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
173style='font-family:"Times New Roman","serif"'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
174</span></span><span style='font-family:"Times New Roman","serif"'>For </span><span
175style='position:relative;top:6.0pt'><img width=28 height=24
176src="sm_image014.gif"></span>= 0  <span style='font-family:
177"Times New Roman","serif"'>and </span><span style='position:relative;
178top:6.0pt'><img width=28 height=24 src="sm_image015.gif"></span> =
179<span style='font-family:"Times New Roman","serif"'>constant:</span></p>
180
181<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
182<img 
183src="sm_image016.gif"></p>
184
185<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
186style='font-family:"Times New Roman","serif"'>For discrete q values, at the q
187values from the data points and at the q values extended up to  q<sub>N</sub>=
188q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img width=28
189height=24 src="sm_image011.gif"></span><span
190style='font-family:"Times New Roman","serif"'>, the smeared intensity can be
191calculated approximately,</span></p>
192
193<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><img 
194src="sm_image017.gif">.                                                           <span
195style='font-family:"Times New Roman","serif"'>5)</span></p>
196
197<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
198style='position:relative;top:7.0pt'><img width=23 height=25
199src="sm_image018.gif"></span> <span style='font-family:
200"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
201style='font-family:"Times New Roman","serif"'>j &lt; i</span></i><span
202style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>.</span></p>
203
204<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
205style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
206
207<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
208style='font-family:"Times New Roman","serif"'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
209</span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
210style='position:relative;top:6.0pt'><img width=28 height=24
211src="sm_image014.gif"></span>= <span style='font-family:
212"Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
213</span><span style='position:relative;top:6.0pt'><img width=28 height=24
214src="sm_image015.gif"></span> = <span style='font-family:
215"Times New Roman","serif"'>0:</span></p>
216
217<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
218style='font-family:"Times New Roman","serif"'>Similarly to 1), we get</span></p>
219
220<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
221<img 
222src="sm_image019.gif">                                                                                       
223<span
224style='font-family:"Times New Roman","serif"'>6)</span></p>
225
226<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
227style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
228- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
229src="sm_image012.gif"></span><span style='font-family:
230"Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
231= q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
232width=28 height=24 src="sm_image012.gif"></span><span
233style='position:relative;top:7.0pt'><img width=23 height=25
234src="sm_image018.gif"></span> <span style='font-family:
235"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
236style='font-family:"Times New Roman","serif"'>j &lt; p</span></i><span
237style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>.</span></p>
238
239<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>&nbsp;</p>
240
241<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
242style='font-family:"Times New Roman","serif"'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
243</span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
244style='position:relative;top:6.0pt'><img width=28 height=24
245src="sm_image014.gif"></span>= <span style='font-family:
246"Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
247</span><span style='position:relative;top:6.0pt'><img width=28 height=24
248src="sm_image015.gif"></span> = <span style='font-family:
249"Times New Roman","serif"'>constant:</span></p>
250
251<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
252style='font-family:"Times New Roman","serif"'>This case, the best way is to
253perform the integration, Eq. (1), numerically for both slit height and width.
254However, the numerical integration is not correct enough unless given a large
255number of iteration, say at least 10000 by 10000 for each element of the matrix
256W, which will take minutes and minutes to finish the calculation for a set of
257typical SANS data. An alternative way which is correct for slit width &lt;&lt;
258slit hight, is used in the SANSView:  This method is a mixed method that
259combines the method 1) with the numerical integration for the slit width.</span></p>
260
261<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
262</p>
263
264<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
265<img 
266src="sm_image020.gif">    <span style='font-family:
267"Times New Roman","serif"'>(7)</span></p>
268
269<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
270style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
271- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
272src="sm_image012.gif"></span><span style='font-family:
273"Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
274= q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
275width=28 height=24 src="sm_image012.gif"></span><span
276style='position:relative;top:7.0pt'><img width=23 height=25
277src="sm_image018.gif"></span> <span style='font-family:
278"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
279style='font-family:"Times New Roman","serif"'>j &lt; p</span></i><span
280style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>. </span></p>
281
282<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
283style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
284
285<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
286style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
287
288<p class=MsoListParagraphCxSpLast><span style='font-size:14.0pt;line-height:
289115%;font-family:"Times New Roman","serif"'><h5><a name="Pinhole Smear">Pinhole Smear</a></h5></span></p>
290
291<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
292pinhole smearing computation is done similar to the Case 2) above except that
293the weight function used was the Gaussian function, so that the Eq. 6) for this
294case becomes</span></p>
295
296<p class=MsoNormal><img 
297src="sm_image021.gif"><span
298style='font-family:"Times New Roman","serif"'>                                                         (8)</span></p>
299
300<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>For all
301the cases above, the weighting matrix <i>W</i> is calculated when the smearing
302is called at the first time, and it includes the ~ 60 q values (finely binned
303evenly) below (&gt;0) and above the q range of data in order to cover all data
304points of the smearing computation for a given model and for a given slit size.
305 The <i>Norm</i> factor is found numerically with the weighting matrix, and
306considered on <i>I<sub>s</sub></i> computation.</span></p>
307
308<p class=MsoListParagraphCxSpFirst style='margin-left:.25in'><span
309style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
310
311<p class=MsoListParagraphCxSpLast><span style='font-size:14.0pt;line-height:
312115%;font-family:"Times New Roman","serif"'><h5><a name="2D Smear">2D Smear</a></h5></span></p>
313
314<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
3152D smearing computation is done similar to the 1D pinhole smearing above
316except that the weight function used was the 2D elliptical Gaussian function</span></p>
317
318<p class=MsoNormal><img 
319src="sm_image022.gif"><span
320style='font-family:"Times New Roman","serif"'>                    (9)</span></p>
321
322<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>In Eq
323(9), x<sub>0</sub> = qcos</span><span style='font-family:Symbol'>(theta)</span><span
324style='font-family:"Times New Roman","serif"'> and y<sub>0</sub>=qsin</span><span
325style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
326, and the primed axes are in the coordinate rotated by an angle </span><span
327style='font-family:Symbol'>theta</span><span style='font-family:"Times New Roman","serif"'>
328around z-axis (below) so that x’<sub>0</sub> =  x<sub>0</sub>cos</span><span
329style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
330sin</span><span style='font-family:Symbol'>(theta)  </span><span style='font-family:
331"Times New Roman","serif"'>and y’<sub>0</sub> =  -x<sub>0</sub>sin</span><span
332style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
333cos</span><span style='font-family:Symbol'>(theta) .</span><span style='font-family:
334"Times New Roman","serif"'> Note that the rotation angle is zero for x-y
335symmetric elliptical Gaussian distribution</span><span style='font-family:Symbol'>.
336</span><span style='font-family:"Times New Roman","serif"'>The  A is a
337normalization factor.</span></p>
338
339<p class=MsoNormal align=center style='text-align:center'><span
340style='font-family:"Times New Roman","serif"'><img width=439 height=376
341id="Object 1" src="sm_image023.gif"></span></p>
342
343<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
344
345<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Now we
346consider a numerical integration where each bins in </span><span
347style='font-family:Symbol'>THETA</span><span style='font-family:"Times New Roman","serif"'>
348and R are <b>evenly </b>(this is to simplify the equation below) distributed by
349</span><span style='font-family:Symbol'>Delta_THETA </span><span style='font-family:
350"Times New Roman","serif"'>and </span><span style='font-family:Symbol'>Delta</span><span
351style='font-family:"Times New Roman","serif"'>R, respectively, and it is
352assumed that I(x’, y’) is constant within the bins which in turn becomes</span></p>
353
354<p class=MsoNormal><img 
355src="sm_image024.gif"></p>
356
357<p class=MsoNormal>                                                                                                                                                                                <span
358style='font-family:"Times New Roman","serif"'>(10)</span></p>
359
360<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Since we
361have found the weighting factor on each bin points, it is convenient to
362transform x’-y’ back to x-y coordinate (rotating it by -</span><span
363style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
364around z axis).  Then, for the polar symmetric smear,</span></p>
365
366<p class=MsoNormal><img 
367src="sm_image025.gif"><span
368style='position:relative;top:35.0pt'>                                                         </span>(11)</p>
369
370<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
371
372<p class=MsoNormal><img 
373src="sm_image026.gif"></p>
374
375<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>while
376for the x-y symmetric smear,</span></p>
377
378<p class=MsoNormal><img 
379src="sm_image027.gif"><span
380style='font-family:"Times New Roman","serif"'>                                                                                          (12)</span></p>
381
382<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
383
384<p class=MsoNormal><img 
385src="sm_image028.gif"></p>
386
387<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Here, the
388current version of the SANSVIEW uses the Eq. (11) for 2D smearing assuming that
389all the Gaussian weighting functions are aligned in the polar coordinate. </span></p>
390<p> In the control panel, the higher accuracy indicates more and finer binnng points
391so that it costs more in time. </p>
392
393
394</div>
395
396</body>
397
398</html>
Note: See TracBrowser for help on using the repository browser.