source: sasview/sansmodels/src/sans/models/media/smear_computation.html @ 5401f2a

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 5401f2a was 17574ae, checked in by Jae Cho <jhjcho@…>, 12 years ago

moving model img files to media/img/

  • Property mode set to 100644
File size: 16.8 KB
RevLine 
[6e8b436]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
7</head>
8
9<body lang=EN-US>
10
11<div class=WordSection1>
12
13<p class=MsoNormal><span style='font-size:16.0pt;line-height:115%;font-family:
[5cc39f10]14"Times New Roman","serif"'><h4>Smear Computation </h4></span></p>
[17574ae]15
[6e8b436]16
17<ul style='margin-top:0in' type=disc>
18 <li class=MsoNormal style='line-height:115%'><a href="#Slit Smear"><b>Slit Smear</b></a>
19     </li>
20 <li class=MsoNormal style='line-height:115%'><a href="#Pinhole Smear"><b>Pinhole Smear</b></a>
21        </li>
22 <li class=MsoNormal style='line-height:115%'><a href="#2D Smear"><b>2D Smear</b></a> 
23        </li>
24</ul>
[17574ae]25
[6e8b436]26<p class=MsoListParagraph><span style='font-size:14.0pt;line-height:115%;
[5cc39f10]27font-family:"Times New Roman","serif"'><h5><a name="Slit Smear">Slit Smear</a></h5></span></p>
[6e8b436]28
29<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The sit
30smeared scattering intensity for SANS is defined by</span></p>
31
32<p class=MsoNormal><img width=349 height=49
[17574ae]33src="./img/sm_image002.gif" align=left hspace=12></p>
[6e8b436]34
[17574ae]35<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>           
36                                 1)</span><br clear=all>
[6e8b436]37<span style='font-family:"Times New Roman","serif"'>where Norm = <span
38style='position:relative;top:15.0pt'><img width=137 height=49
[17574ae]39src="./img/sm_image003.gif"></span>.</span></p>
[6e8b436]40
41<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
42functions <span style='position:relative;top:6.0pt'><img width=43 height=25
[17574ae]43src="./img/sm_image004.gif"></span>and <span style='position:
[6e8b436]44relative;top:6.0pt'><img width=43 height=25
[17574ae]45src="./img/sm_image005.gif"></span>refer to the slit width weighting
[6e8b436]46function and the slit height weighting determined at the q point, respectively.
[17574ae]47 Here, we assumes that the weighting function is described by a rectangular
[6e8b436]48function, i.e.,</span></p>
49
50<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=134
[17574ae]51height=26 src="./img/sm_image006.gif">                                                                                                       
52  </span><span style='font-family:"Times New Roman","serif";position:relative;
[6e8b436]53top:7.0pt'>2)</span></p>
54
55<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>and </span></p>
56
57<p class=MsoNormal><span style='position:relative;top:7.0pt'><img width=136
[17574ae]58height=26 src="./img/sm_image007.gif"></span>,                                                                             
59                         <span style='font-family:"Times New Roman","serif"'>3)</span></p>
[6e8b436]60
61<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>so that </span><span
62style='position:relative;top:6.0pt'><img width=58 height=23
[17574ae]63src="./img/sm_image008.gif"></span> <span style='position:relative;
64top:16.0pt'><img width=76 height=51 src="./img/sm_image009.gif"></span> <span
65style='font-family:"Times New Roman","serif"'>for</span>  <span
[6e8b436]66style='position:relative;top:3.0pt'><img width=40 height=15
[17574ae]67src="./img/sm_image010.gif"></span> <span style='font-family:
[6e8b436]68"Times New Roman","serif"'>and <i>u</i>. The </span><span style='position:relative;
[17574ae]69top:6.0pt'><img width=28 height=24 src="./img/sm_image011.gif"></span> <span
[6e8b436]70style='font-family:"Times New Roman","serif"'>and </span><span
71style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]72src="./img/sm_image012.gif"> </span><span style='font-family:
[6e8b436]73"Times New Roman","serif"'>stand for the slit height (FWHM/2) and the slit
74width (FWHM/2) in the q space. Now the integral of Eq. (1) is simplified to</span></p>
75
76<p class=MsoNormal><img width=283 height=52
[17574ae]77src="./img/sm_image013.gif" align=left hspace=12><span
78style='font-family:"Times New Roman","serif"'>                                                 
79         4)</span></p>
[6e8b436]80
81<p class=MsoNormal><span style='font-family:"Times New Roman","serif";
82position:relative;top:20.0pt'>&nbsp;</span></p>
83
84<p class=MsoListParagraphCxSpFirst style='margin-left:0in'><b><span
85style='font-family:"Times New Roman","serif"'>Numerical Implementation of Eq.
86(4) </span></b></p>
87
88<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
89style='font-family:"Times New Roman","serif"'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
90</span></span><span style='font-family:"Times New Roman","serif"'>For </span><span
91style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]92src="./img/sm_image014.gif"></span>= 0  <span style='font-family:
[6e8b436]93"Times New Roman","serif"'>and </span><span style='position:relative;
[17574ae]94top:6.0pt'><img width=28 height=24 src="./img/sm_image015.gif"></span> =
[6e8b436]95<span style='font-family:"Times New Roman","serif"'>constant:</span></p>
96
97<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
[17574ae]98<img src="./img/sm_image016.gif"></p>
[6e8b436]99
100<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
101style='font-family:"Times New Roman","serif"'>For discrete q values, at the q
[17574ae]102values from the data points and at the q values extended up to  q<sub>N</sub>=
[6e8b436]103q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img width=28
[17574ae]104height=24 src="./img/sm_image011.gif"></span><span
[6e8b436]105style='font-family:"Times New Roman","serif"'>, the smeared intensity can be
106calculated approximately,</span></p>
107
108<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><img 
[17574ae]109src="./img/sm_image017.gif">.                                                           
110<span style='font-family:"Times New Roman","serif"'>5)</span></p>
[6e8b436]111
112<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
113style='position:relative;top:7.0pt'><img width=23 height=25
[17574ae]114src="./img/sm_image018.gif"></span> <span style='font-family:
[6e8b436]115"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
116style='font-family:"Times New Roman","serif"'>j &lt; i</span></i><span
117style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>.</span></p>
118
119<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
120style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
121
122<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
123style='font-family:"Times New Roman","serif"'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[17574ae]124</span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
[6e8b436]125style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]126src="./img/sm_image014.gif"></span>= <span style='font-family:
127"Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
[6e8b436]128</span><span style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]129src="./img/sm_image015.gif"></span> = <span style='font-family:
[6e8b436]130"Times New Roman","serif"'>0:</span></p>
131
132<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
133style='font-family:"Times New Roman","serif"'>Similarly to 1), we get</span></p>
134
135<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
[17574ae]136<img src="./img/sm_image019.gif">                                                                                       
137<span style='font-family:"Times New Roman","serif"'>6)</span></p>
[6e8b436]138
139<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
[17574ae]140style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
[6e8b436]141- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]142src="./img/sm_image012.gif"></span><span style='font-family:
143"Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
[6e8b436]144= q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
[17574ae]145width=28 height=24 src="./img/sm_image012.gif"></span><span
[6e8b436]146style='position:relative;top:7.0pt'><img width=23 height=25
[17574ae]147src="./img/sm_image018.gif"></span> <span style='font-family:
[6e8b436]148"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
149style='font-family:"Times New Roman","serif"'>j &lt; p</span></i><span
150style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>.</span></p>
151
152<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>&nbsp;</p>
153
154<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in;text-indent:-.25in'><span
155style='font-family:"Times New Roman","serif"'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[17574ae]156</span></span><span style='font-family:"Times New Roman","serif"'>For  </span><span
[6e8b436]157style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]158src="./img/sm_image014.gif"></span>= <span style='font-family:
159"Times New Roman","serif"'>constant </span> <span style='font-family:"Times New Roman","serif"'>and
[6e8b436]160</span><span style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]161src="./img/sm_image015.gif"></span> = <span style='font-family:
[6e8b436]162"Times New Roman","serif"'>constant:</span></p>
163
164<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
165style='font-family:"Times New Roman","serif"'>This case, the best way is to
166perform the integration, Eq. (1), numerically for both slit height and width.
167However, the numerical integration is not correct enough unless given a large
168number of iteration, say at least 10000 by 10000 for each element of the matrix
169W, which will take minutes and minutes to finish the calculation for a set of
170typical SANS data. An alternative way which is correct for slit width &lt;&lt;
[17574ae]171slit hight, is used in the SANSView:  This method is a mixed method that
[6e8b436]172combines the method 1) with the numerical integration for the slit width.</span></p>
173
174<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
175</p>
176
177<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'>
[17574ae]178<img src="./img/sm_image020.gif">    <span style='font-family:
[6e8b436]179"Times New Roman","serif"'>(7)</span></p>
180
181<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
[17574ae]182style='font-family:"Times New Roman","serif"'>for  q<sub>p</sub> = q<sub>i</sub>
[6e8b436]183- </span><span style='position:relative;top:6.0pt'><img width=28 height=24
[17574ae]184src="./img/sm_image012.gif"></span><span style='font-family:
185"Times New Roman","serif"'> and</span> <span style='font-family:"Times New Roman","serif"'>q<sub>N</sub>
[6e8b436]186= q<sub>i</sub> + </span><span style='position:relative;top:6.0pt'><img
[17574ae]187width=28 height=24 src="./img/sm_image012.gif"></span><span
[6e8b436]188style='position:relative;top:7.0pt'><img width=23 height=25
[17574ae]189src="./img/sm_image018.gif"></span> <span style='font-family:
[6e8b436]190"Times New Roman","serif"'>= 0 for <i>I<sub>s</sub></i> in</span> <i><span
191style='font-family:"Times New Roman","serif"'>j &lt; p</span></i><span
192style='font-family:"Times New Roman","serif"'> or<i> j&gt;N-1</i>. </span></p>
193
194<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
195style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
196
197<p class=MsoListParagraphCxSpMiddle style='margin-left:.25in'><span
198style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
199
200<p class=MsoListParagraphCxSpLast><span style='font-size:14.0pt;line-height:
[5cc39f10]201115%;font-family:"Times New Roman","serif"'><h5><a name="Pinhole Smear">Pinhole Smear</a></h5></span></p>
[6e8b436]202
203<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
204pinhole smearing computation is done similar to the Case 2) above except that
205the weight function used was the Gaussian function, so that the Eq. 6) for this
206case becomes</span></p>
207
[17574ae]208<p class=MsoNormal><img src="./img/sm_image021.gif"><span
209style='font-family:"Times New Roman","serif"'>                                                         (8)</span></p>
[6e8b436]210
211<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>For all
212the cases above, the weighting matrix <i>W</i> is calculated when the smearing
213is called at the first time, and it includes the ~ 60 q values (finely binned
214evenly) below (&gt;0) and above the q range of data in order to cover all data
215points of the smearing computation for a given model and for a given slit size.
[17574ae]216 The <i>Norm</i> factor is found numerically with the weighting matrix, and
[6e8b436]217considered on <i>I<sub>s</sub></i> computation.</span></p>
218
219<p class=MsoListParagraphCxSpFirst style='margin-left:.25in'><span
220style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
221
222<p class=MsoListParagraphCxSpLast><span style='font-size:14.0pt;line-height:
[5cc39f10]223115%;font-family:"Times New Roman","serif"'><h5><a name="2D Smear">2D Smear</a></h5></span></p>
[6e8b436]224
225<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>The
2262D smearing computation is done similar to the 1D pinhole smearing above
227except that the weight function used was the 2D elliptical Gaussian function</span></p>
228
[17574ae]229<p class=MsoNormal><img src="./img/sm_image022.gif"><span
230style='font-family:"Times New Roman","serif"'>                    (9)</span></p>
[6e8b436]231
232<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>In Eq
[8956bdb]233(9), x<sub>0</sub> = qcos</span><span style='font-family:Symbol'>(theta)</span><span
[6e8b436]234style='font-family:"Times New Roman","serif"'> and y<sub>0</sub>=qsin</span><span
[8956bdb]235style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
[6e8b436]236, and the primed axes are in the coordinate rotated by an angle </span><span
[8956bdb]237style='font-family:Symbol'>theta</span><span style='font-family:"Times New Roman","serif"'>
[17574ae]238around z-axis (below) so that x’<sub>0</sub> =  x<sub>0</sub>cos</span><span
[8956bdb]239style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
[17574ae]240sin</span><span style='font-family:Symbol'>(theta)  </span><span style='font-family:
241"Times New Roman","serif"'>and y’<sub>0</sub> =  -x<sub>0</sub>sin</span><span
[8956bdb]242style='font-family:Symbol'>(theta) + </span><span style='font-family:"Times New Roman","serif"'>y<sub>0</sub>
243cos</span><span style='font-family:Symbol'>(theta) .</span><span style='font-family:
[6e8b436]244"Times New Roman","serif"'> Note that the rotation angle is zero for x-y
245symmetric elliptical Gaussian distribution</span><span style='font-family:Symbol'>.
[17574ae]246</span><span style='font-family:"Times New Roman","serif"'>The  A is a
[6e8b436]247normalization factor.</span></p>
248
249<p class=MsoNormal align=center style='text-align:center'><span
250style='font-family:"Times New Roman","serif"'><img width=439 height=376
[17574ae]251id="Object 1" src="./img/sm_image023.gif"></span></p>
[6e8b436]252
253<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>&nbsp;</span></p>
254
255<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Now we
256consider a numerical integration where each bins in </span><span
[8956bdb]257style='font-family:Symbol'>THETA</span><span style='font-family:"Times New Roman","serif"'>
[6e8b436]258and R are <b>evenly </b>(this is to simplify the equation below) distributed by
[8956bdb]259</span><span style='font-family:Symbol'>Delta_THETA </span><span style='font-family:
260"Times New Roman","serif"'>and </span><span style='font-family:Symbol'>Delta</span><span
[6e8b436]261style='font-family:"Times New Roman","serif"'>R, respectively, and it is
262assumed that I(x’, y’) is constant within the bins which in turn becomes</span></p>
263
[17574ae]264<p class=MsoNormal><img src="./img/sm_image024.gif"></p>
[6e8b436]265
[17574ae]266<p class=MsoNormal>                                                                                                                                                                                <span
[6e8b436]267style='font-family:"Times New Roman","serif"'>(10)</span></p>
268
269<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Since we
270have found the weighting factor on each bin points, it is convenient to
271transform x’-y’ back to x-y coordinate (rotating it by -</span><span
[8956bdb]272style='font-family:Symbol'>(theta)</span><span style='font-family:"Times New Roman","serif"'>
[17574ae]273around z axis).  Then, for the polar symmetric smear,</span></p>
[6e8b436]274
[17574ae]275<p class=MsoNormal><img src="./img/sm_image025.gif"><span
276style='position:relative;top:35.0pt'>                                                         </span>(11)</p>
[6e8b436]277
278<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
279
[17574ae]280<p class=MsoNormal><img src="./img/sm_image026.gif"></p>
[6e8b436]281
282<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>while
283for the x-y symmetric smear,</span></p>
284
[17574ae]285<p class=MsoNormal><img src="./img/sm_image027.gif"><span
286style='font-family:"Times New Roman","serif"'>                                                                                          (12)</span></p>
[6e8b436]287
288<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>where,</span></p>
289
[17574ae]290<p class=MsoNormal><img src="./img/sm_image028.gif"></p>
[6e8b436]291
292<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>Here, the
293current version of the SANSVIEW uses the Eq. (11) for 2D smearing assuming that
294all the Gaussian weighting functions are aligned in the polar coordinate. </span></p>
[50764a4]295<p> In the control panel, the higher accuracy indicates more and finer binnng points
296so that it costs more in time. </p>
297
[6e8b436]298
299</div>
300
301</body>
302
303</html>
Note: See TracBrowser for help on using the repository browser.