source: sasview/src/sas/perspectives/fitting/media/sm_help.rst @ 892a2cc

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 892a2cc was cfc5917, checked in by smk78, 10 years ago

Work in progress

  • Property mode set to 100644
File size: 5.9 KB
RevLine 
[da53353]1.. sm_help.rst
2
3.. This is a port of the original SasView html help file to ReSTructured text
4.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015.
5
6.. |beta| unicode:: U+03B2
7.. |gamma| unicode:: U+03B3
8.. |mu| unicode:: U+03BC
9.. |sigma| unicode:: U+03C3
10.. |phi| unicode:: U+03C6
11.. |theta| unicode:: U+03B8
12.. |chi| unicode:: U+03C7
13
14.. |inlineimage004| image:: sm_image004.gif
15.. |inlineimage005| image:: sm_image005.gif
16.. |inlineimage008| image:: sm_image008.gif
17.. |inlineimage009| image:: sm_image009.gif
18.. |inlineimage010| image:: sm_image010.gif
19.. |inlineimage011| image:: sm_image011.gif
20.. |inlineimage012| image:: sm_image012.gif
21.. |inlineimage018| image:: sm_image018.gif
22.. |inlineimage019| image:: sm_image019.gif
23
24
25.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
26
27Smearing Computation
28--------------------
29
[a0637de]30The following three smearing algorithms are provided
[da53353]31
[a0637de]32*  *Slit Smearing*
33*  *Pinhole Smearing*
34*  *2D Smearing*
[da53353]35
[a0637de]36.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
[da53353]37
38Slit Smearing
[cfc5917]39^^^^^^^^^^^^^
[da53353]40
41The sit smeared scattering intensity for SAS is defined by
42
43.. image:: sm_image002.gif
44
45where Norm =
46
47.. image:: sm_image003.gif
48
49Equation 1
50
51The functions |inlineimage004| and |inlineimage005|
52refer to the slit width weighting function and the slit height weighting
53determined at the q point, respectively. Here, we assumes that the weighting
54function is described by a rectangular function, i.e.,
55
56.. image:: sm_image006.gif
57
58Equation 2
59
60and
61
62.. image:: sm_image007.gif
63
64Equation 3
65
66so that |inlineimage008| |inlineimage009| for |inlineimage010| and u.
67
68The |inlineimage011| and |inlineimage012| stand for
69the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the
70integral of Equation 1 is simplified to
71
72.. image:: sm_image013.gif
73
74Equation 4
75
[cfc5917]76Numerical Implementation of Equation 4: Case 1
77^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[da53353]78
79For |inlineimage012| = 0 and |inlineimage011| = constant.
80
81.. image:: sm_image016.gif
82
83For discrete q values, at the q values from the data points and at the q
84values extended up to qN= qi + |inlineimage011| the smeared
85intensity can be calculated approximately
86
87.. image:: sm_image017.gif
88
89Equation 5
90
91|inlineimage018| = 0 for *Is* in *j* < *i* or *j* > N-1*.
92
[cfc5917]93Numerical Implementation of Equation 4: Case 2
94^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[da53353]95
96For |inlineimage012| = constant and |inlineimage011| = 0.
97
98Similarly to Case 1, we get
99
100|inlineimage019| for qp= qi- |inlineimage012| and qN= qi+ |inlineimage012|. |inlineimage018| = 0
101for *Is* in *j* < *p* or *j* > *N-1*.
102
[cfc5917]103Numerical Implementation of Equation 4: Case 3
104^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[da53353]105
106For |inlineimage011| = constant and
107|inlineimage011| = constant.
108
109In this case, the best way is to perform the integration, Equation 1,
110numerically for both slit height and width. However, the numerical integration
111is not correct enough unless given a large number of iteration, say at least
11210000 by 10000 for each element of the matrix, W, which will take minutes and
113minutes to finish the calculation for a set of typical SAS data. An
114alternative way which is correct for slit width << slit hight, is used in
115SasView. This method is a mixed method that combines method 1 with the
116numerical integration for the slit width.
117
118.. image:: sm_image020.gif
119
120Equation 7
121
122for qp= qi- |inlineimage012| and
123qN= qi+ |inlineimage012|. |inlineimage018| = 0 for
124*Is* in *j* < *p* or *j* > *N-1*.
125
[a0637de]126.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
[da53353]127
128Pinhole Smearing
[cfc5917]129^^^^^^^^^^^^^^^^
[da53353]130
131The pinhole smearing computation is done similar to the case above except
132that the weight function used is the Gaussian function, so that the Equation 6
133for this case becomes
134
135.. image:: sm_image021.gif
136
137Equation 8
138
139For all the cases above, the weighting matrix *W* is calculated when the
140smearing is called at the first time, and it includes the ~ 60 q values
141(finely binned evenly) below (\>0) and above the q range of data in order
142to cover all data points of the smearing computation for a given model and
143for a given slit size. The *Norm*  factor is found numerically with the
144weighting matrix, and considered on *Is* computation.
145
[a0637de]146.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
[da53353]147
1482D Smearing
[cfc5917]149^^^^^^^^^^^
[da53353]150
151The 2D smearing computation is done similar to the 1D pinhole smearing above
152except that the weight function used was the 2D elliptical Gaussian function
153
154.. image:: sm_image022.gif
155
156Equation 9
157
158In Equation 9, x0 = qcos/theta/ and y0 = qsin/theta/, and the primed axes
159are in the coordinate rotated by an angle /theta/ around the z-axis (below)
160so that x’0= x0cos/theta/+y0sin/theta/ and y’0= -x0sin/theta/+y0cos/theta/.
161
162Note that the rotation angle is zero for x-y symmetric elliptical Gaussian
163distribution. The A is a normalization factor.
164
165.. image:: sm_image023.gif
166
167Now we consider a numerical integration where each bins in /theta/ and R are
168*evenly* (this is to simplify the equation below) distributed by /delta//theta/
169and /delta/R, respectively, and it is assumed that I(x’, y’) is constant
170within the bins which in turn becomes
171
172.. image:: sm_image024.gif
173
174Equation 10
175
176Since we have found the weighting factor on each bin points, it is convenient
177to transform x’-y’ back to x-y coordinate (rotating it by -/theta/ around z
178axis). Then, for the polar symmetric smear
179
180.. image:: sm_image025.gif
181
182Equation 11
183
184where
185
186.. image:: sm_image026.gif
187
188while for the x-y symmetric smear
189
190.. image:: sm_image027.gif
191
192Equation 12
193
194where
195
196.. image:: sm_image028.gif
197
198Here, the current version of the SasView uses Equation 11 for 2D smearing
199assuming that all the Gaussian weighting functions are aligned in the polar
200coordinate.
201
202In the control panel, the higher accuracy indicates more and finer binnng
203points so that it costs more in time.
204
205.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Note: See TracBrowser for help on using the repository browser.