Changeset f256d9b in sasview for src/sas


Ignore:
Timestamp:
May 1, 2015 10:58:57 AM (10 years ago)
Author:
smk78
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
3b67c30
Parents:
a9dc4eb
Message:

Proof read.

Location:
src/sas/perspectives/fitting/media
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/media/fitting.rst

    rcfc5917 rf256d9b  
    55   :maxdepth: 1 
    66 
    7    Fitting Perspective <fitting_help> 
     7   Fitting Data <fitting_help> 
    88 
    99   Polydispersity Distributions <pd_help> 
    1010 
    11    Smearing Computation <sm_help> 
     11   Smearing Functions <sm_help> 
    1212 
    1313   Polarisation/Magnetic Scattering <mag_help> 
  • src/sas/perspectives/fitting/media/pd_help.rst

    r892a2cc rf256d9b  
    1111.. |theta| unicode:: U+03B8 
    1212.. |chi| unicode:: U+03C7 
     13.. |Ang| unicode:: U+212B 
    1314 
    1415.. |inlineimage004| image:: sm_image004.gif 
     
    2829---------------------------- 
    2930 
    30 Calculates the form factor for a polydisperse and/or angular population of  
    31 particles with uniform scattering length density. The resultant form factor  
    32 is normalized by the average particle volume such that  
    33  
    34 P(q) = scale*\<F*F\>/Vol + bkg 
    35  
    36 where F is the scattering amplitude and the\<\>denote an average over the size  
    37 distribution.  Users should use PD (polydispersity: this definition is  
    38 different from the typical definition in polymer science) for a size  
    39 distribution and Sigma for an angular distribution (see below). 
    40  
    41 Note that this computation is very time intensive thus applying polydispersion/ 
    42 angular distribution for more than one parameters or increasing Npts values 
    43 might need extensive patience to complete the computation. Also note that  
    44 even though it is time consuming, it is safer to have larger values of Npts  
    45 and Nsigmas. 
    46  
    47 The following five distribution functions are provided 
     31With some models SasView can calculate the average form factor for a population 
     32of particles that exhibit size and/or orientational polydispersity. The resultant 
     33form factor is normalized by the average particle volume such that 
     34 
     35*P(q) = scale* * \ <F*\F> / *V + bkg* 
     36 
     37where F is the scattering amplitude and the \<\> denote an average over the size 
     38distribution. 
     39 
     40Users should note that this computation is very intensive. Applying polydispersion 
     41to multiple parameters at the same time, or increasing the number of *Npts* values 
     42in the fit, will require patience! However, the calculations are generally more 
     43robust with more data points or more angles. 
     44 
     45SasView uses the term *PD* for a size distribution (and not to be confused with a 
     46molecular weight distributions in polymer science) and the term *Sigma* for an 
     47angular distribution. 
     48 
     49The following five distribution functions are provided: 
    4850 
    4951*  *Rectangular Distribution* 
    50 *  *Array Distribution* 
    5152*  *Gaussian Distribution* 
    5253*  *Lognormal Distribution* 
    5354*  *Schulz Distribution* 
     55*  *Array Distribution* 
    5456 
    5557.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    5860^^^^^^^^^^^^^^^^^^^^^^^^ 
    5961 
     62The Rectangular Distribution is defined as 
     63 
    6064.. image:: pd_image001.png 
    6165 
    62 The xmean is the mean of the distribution, w is the half-width, and Norm is a  
    63 normalization factor which is determined during the numerical calculation.  
    64 Note that the Sigma and the half width *w*  are different. 
     66where *xmean* is the mean of the distribution, *w* is the half-width, and *Norm* is a 
     67normalization factor which is determined during the numerical calculation. 
     68 
     69Note that the standard deviation and the half width *w* are different! 
    6570 
    6671The standard deviation is 
     
    6873.. image:: pd_image002.png 
    6974 
    70 The PD (polydispersity) is 
     75whilst the polydispersity is 
    7176 
    7277.. image:: pd_image003.png 
    7378 
    7479.. image:: pd_image004.jpg 
     80 
     81.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     82 
     83Gaussian Distribution 
     84^^^^^^^^^^^^^^^^^^^^^ 
     85 
     86The Gaussian Distribution is defined as 
     87 
     88.. image:: pd_image005.png 
     89 
     90where *xmean* is the mean of the distribution and *Norm* is a normalization factor 
     91which is determined during the numerical calculation. 
     92 
     93The polydispersity is 
     94 
     95.. image:: pd_image003.png 
     96 
     97 
     98.. image:: pd_image006.jpg 
     99 
     100.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     101 
     102Lognormal Distribution 
     103^^^^^^^^^^^^^^^^^^^^^^ 
     104 
     105The Lognormal Distribution is defined as 
     106 
     107.. image:: pd_image007.png 
     108 
     109where |mu|\ =ln(*xmed*), *xmed* is the median value of the distribution, and 
     110*Norm* is a normalization factor which will be determined during the numerical 
     111calculation. 
     112 
     113The median value for the distribution will be the value given for the respective 
     114size parameter in the *Fitting Perspective*, for example, radius = 60. 
     115 
     116The polydispersity is given by |sigma| 
     117 
     118.. image:: pd_image008.png 
     119 
     120For the angular distribution 
     121 
     122.. image:: pd_image009.png 
     123 
     124The mean value is given by *xmean*\ =exp(|mu|\ +p\ :sup:`2`\ /2). The peak value 
     125is given by *xpeak*\ =exp(|mu|-p\ :sup:`2`\ ). 
     126 
     127.. image:: pd_image010.jpg 
     128 
     129This distribution function spreads more, and the peak shifts to the left, as *p* 
     130increases, requiring higher values of Nsigmas and Npts. 
     131 
     132.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     133 
     134Schulz Distribution 
     135^^^^^^^^^^^^^^^^^^^ 
     136 
     137The Schulz distribution is defined as 
     138 
     139.. image:: pd_image011.png 
     140 
     141where *xmean* is the mean of the distribution and *Norm* is a normalization factor 
     142which is determined during the numerical calculation, and *z* is a measure of the 
     143width of the distribution such that 
     144 
     145z = (1-p\ :sup:`2`\ ) / p\ :sup:`2` 
     146 
     147The polydispersity is 
     148 
     149.. image:: pd_image012.png 
     150 
     151Note that larger values of PD might need larger values of Npts and Nsigmas. 
     152For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least. 
     153 
     154.. image:: pd_image013.jpg 
     155 
     156For further information on the Schulz distribution see: 
     157M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461. 
    75158 
    76159.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    79162^^^^^^^^^^^^^^^^^^ 
    80163 
    81 This distribution is to be given by users as a txt file where the array  
    82 should be defined by two columns in the order of x and f(x) values. The f(x)  
     164This user-definable distribution should be given as as a simple ASCII text file 
     165where the array is defined by two columns of numbers: *x* and *f(x)*. The *f(x)* 
    83166will be normalized by SasView during the computation. 
    84167 
    85 Example of an array in the file 
    86  
    87 30        0.1 
    88 32        0.3 
    89 35        0.4 
    90 36        0.5 
    91 37        0.6 
    92 39        0.7 
    93 41        0.9 
    94  
    95 We use only these array values in the computation, therefore the mean value  
    96 given in the control panel, for example ‘radius = 60’, will be ignored. 
    97  
    98 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    99  
    100 Gaussian Distribution 
    101 ^^^^^^^^^^^^^^^^^^^^^ 
    102  
    103 .. image:: pd_image005.png 
    104  
    105 The xmean is the mean of the distribution and Norm is a normalization factor  
    106 which is determined during the numerical calculation. 
    107  
    108 The PD (polydispersity) is 
    109  
    110 .. image:: pd_image003.png 
    111  
    112 .. image:: pd_image006.jpg 
    113  
    114 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    115  
    116 Lognormal Distribution 
    117 ^^^^^^^^^^^^^^^^^^^^^^ 
    118  
    119 .. image:: pd_image007.png 
    120  
    121 The /mu/=ln(xmed), xmed is the median value of the distribution, and Norm is a  
    122 normalization factor which will be determined during the numerical calculation.  
    123 The median value is the value given in the size parameter in the control panel,  
    124 for example, “radius = 60â€ᅵ. 
    125  
    126 The PD (polydispersity) is given by /sigma/ 
    127  
    128 .. image:: pd_image008.png 
    129  
    130 For the angular distribution 
    131  
    132 .. image:: pd_image009.png 
    133  
    134 The mean value is given by xmean=exp(/mu/+p2/2). The peak value is given by  
    135 xpeak=exp(/mu/-p2). 
    136  
    137 .. image:: pd_image010.jpg 
    138  
    139 This distribution function spreads more and the peak shifts to the left as the  
    140 p increases, requiring higher values of Nsigmas and Npts. 
    141  
    142 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    143  
    144 Schulz Distribution 
    145 ^^^^^^^^^^^^^^^^^^^ 
    146  
    147 .. image:: pd_image011.png 
    148  
    149 The xmean is the mean of the distribution and Norm is a normalization factor 
    150 which is determined during the numerical calculation. 
    151  
    152 The z = 1/p2– 1. 
    153  
    154 The PD (polydispersity) is 
    155  
    156 .. image:: pd_image012.png 
    157  
    158 Note that the higher PD (polydispersity) might need higher values of Npts and  
    159 Nsigmas. For example, at PD = 0.7 and radisus = 60 A, Npts >= 160, and  
    160 Nsigmas >= 15 at least. 
    161  
    162 .. image:: pd_image013.jpg 
    163  
    164 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     168Example of what an array distribution file should look like: 
     169 
     170====  ===== 
     171 30    0.1 
     172 32    0.3 
     173 35    0.4 
     174 36    0.5 
     175 37    0.6 
     176 39    0.7 
     177 41    0.9 
     178====  ===== 
     179 
     180SasView only uses these array values during the computation, therefore any mean 
     181value of the parameter represented by *x* present in the *Fitting Perspective* 
     182will be ignored. 
     183 
     184.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     185 
     186Note about DLS polydispersity 
     187^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     188 
     189Many commercial Dynamic Light Scattering (DLS) instruments produce a size 
     190polydispersity parameter, sometimes even given the symbol *p*! This parameter is 
     191defined as the relative standard deviation coefficient of variation of the size 
     192distribution and is NOT the same as the polydispersity parameters in the Lognormal 
     193and Schulz distributions above (though they all related) except when the DLS 
     194polydispersity parameter is <0.13. 
     195 
     196For more information see: 
     197S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143 
     198 
     199.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     200 
     201.. note::  This help document was last changed by Steve King, 01May2015 
  • src/sas/perspectives/fitting/media/sm_help.rst

    rcfc5917 rf256d9b  
    1111.. |theta| unicode:: U+03B8 
    1212.. |chi| unicode:: U+03C7 
     13.. |bigdelta| unicode:: U+0394 
    1314 
    1415.. |inlineimage004| image:: sm_image004.gif 
     
    2526.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    2627 
    27 Smearing Computation 
    28 -------------------- 
    29  
    30 The following three smearing algorithms are provided 
     28Smearing Functions 
     29================== 
     30 
     31Sometimes it will be necessary to correct reduced experimental data for the 
     32physical effects of the instrumental geometry in use. This process is called 
     33*desmearing*. However, calculated/simulated data - which by definition will be 
     34perfect/exact - can be *smeared* to make it more representative of what might 
     35actually be measured experimentally. 
     36 
     37SasView provides the following three smearing algorithms: 
    3138 
    3239*  *Slit Smearing* 
     
    3744 
    3845Slit Smearing 
    39 ^^^^^^^^^^^^^ 
    40  
    41 The sit smeared scattering intensity for SAS is defined by 
     46------------- 
     47 
     48**This type of smearing is normally only encountered with data from X-ray Kratky** 
     49**cameras or X-ray/neutron Bonse-Hart USAXS/USANS instruments.** 
     50 
     51The slit-smeared scattering intensity is defined by 
    4252 
    4353.. image:: sm_image002.gif 
    4454 
    45 where Norm = 
     55where *Norm* is given by 
    4656 
    4757.. image:: sm_image003.gif 
    4858 
    49 Equation 1 
     59**[Equation 1]** 
    5060 
    5161The functions |inlineimage004| and |inlineimage005| 
    5262refer to the slit width weighting function and the slit height weighting  
    53 determined at the q point, respectively. Here, we assumes that the weighting  
    54 function is described by a rectangular function, i.e., 
     63determined at the given *q* point, respectively. It is assumed that the weighting 
     64function is described by a rectangular function, such that 
    5565 
    5666.. image:: sm_image006.gif 
    5767 
    58 Equation 2 
     68**[Equation 2]** 
    5969 
    6070and 
     
    6272.. image:: sm_image007.gif 
    6373 
    64 Equation 3 
    65  
    66 so that |inlineimage008| |inlineimage009| for |inlineimage010| and u. 
    67  
    68 The |inlineimage011| and |inlineimage012| stand for 
    69 the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the  
    70 integral of Equation 1 is simplified to 
     74**[Equation 3]** 
     75 
     76so that |inlineimage008| |inlineimage009| for |inlineimage010| and *u*\ . 
     77 
     78Here |inlineimage011| and |inlineimage012| stand for 
     79the slit height (FWHM/2) and the slit width (FWHM/2) in *q* space. 
     80 
     81This simplifies the integral in Equation 1 to 
    7182 
    7283.. image:: sm_image013.gif 
    7384 
    74 Equation 4 
    75  
    76 Numerical Implementation of Equation 4: Case 1 
    77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    78  
    79 For |inlineimage012| = 0 and |inlineimage011| = constant. 
     85**[Equation 4]** 
     86 
     87which may be solved numerically, depending on the nature of |inlineimage011| and |inlineimage012| . 
     88 
     89Solution 1 
     90^^^^^^^^^^ 
     91 
     92**For** |inlineimage012| **= 0 and** |inlineimage011| **= constant.** 
    8093 
    8194.. image:: sm_image016.gif 
    8295 
    83 For discrete q values, at the q values from the data points and at the q  
    84 values extended up to qN= qi + |inlineimage011| the smeared  
    85 intensity can be calculated approximately 
     96For discrete *q* values, at the *q* values of the data points and at the *q* 
     97values extended up to *q*\ :sub:`N`\ = *q*\ :sub:`i` + |inlineimage011| the smeared 
     98intensity can be approximately calculated as 
    8699 
    87100.. image:: sm_image017.gif 
    88101 
    89 Equation 5 
    90  
    91 |inlineimage018| = 0 for *Is* in *j* < *i* or *j* > N-1*. 
    92  
    93 Numerical Implementation of Equation 4: Case 2 
    94 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    95  
    96 For |inlineimage012| = constant and |inlineimage011| = 0. 
    97  
    98 Similarly to Case 1, we get 
    99  
    100 |inlineimage019| for qp= qi- |inlineimage012| and qN= qi+ |inlineimage012|. |inlineimage018| = 0 
    101 for *Is* in *j* < *p* or *j* > *N-1*. 
    102  
    103 Numerical Implementation of Equation 4: Case 3 
    104 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
    105  
    106 For |inlineimage011| = constant and  
    107 |inlineimage011| = constant. 
    108  
    109 In this case, the best way is to perform the integration, Equation 1,  
    110 numerically for both slit height and width. However, the numerical integration  
    111 is not correct enough unless given a large number of iteration, say at least  
    112 10000 by 10000 for each element of the matrix, W, which will take minutes and  
    113 minutes to finish the calculation for a set of typical SAS data. An  
    114 alternative way which is correct for slit width << slit hight, is used in  
    115 SasView. This method is a mixed method that combines method 1 with the  
    116 numerical integration for the slit width. 
     102**[Equation 5]** 
     103 
     104where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *i* or *j* > *N-1*. 
     105 
     106Solution 2 
     107^^^^^^^^^^ 
     108 
     109**For** |inlineimage012| **= constant and** |inlineimage011| **= 0.** 
     110 
     111Similar to Case 1 
     112 
     113|inlineimage019| for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012| 
     114 
     115**[Equation 6]** 
     116 
     117where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*. 
     118 
     119Solution 3 
     120^^^^^^^^^^ 
     121 
     122**For** |inlineimage011| **= constant and** |inlineimage011| **= constant.** 
     123 
     124In this case, the best way is to perform the integration of Equation 1 
     125numerically for both slit height and slit width. However, the numerical 
     126integration is imperfect unless a large number of iterations, say, at 
     127least 10000 by 10000 for each element of the matrix *W*, is performed. 
     128This is usually too slow for routine use. 
     129 
     130An alternative approach is used in SasView which assumes 
     131slit width << slit height. This method combines Solution 1 with the 
     132numerical integration for the slit width. Then 
    117133 
    118134.. image:: sm_image020.gif 
    119135 
    120 Equation 7 
    121  
    122 for qp= qi- |inlineimage012| and 
    123 qN= qi+ |inlineimage012|. |inlineimage018| = 0 for 
    124 *Is* in *j* < *p* or *j* > *N-1*. 
     136**[Equation 7]** 
     137 
     138for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012| 
     139 
     140where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*. 
    125141 
    126142.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    127143 
    128144Pinhole Smearing 
    129 ^^^^^^^^^^^^^^^^ 
    130  
    131 The pinhole smearing computation is done similar to the case above except  
    132 that the weight function used is the Gaussian function, so that the Equation 6  
    133 for this case becomes 
     145---------------- 
     146 
     147**This is the type of smearing normally encountered with data from synchrotron** 
     148**SAXS cameras and SANS instruments.** 
     149 
     150The pinhole smearing computation is performed in a similar fashion to the slit- 
     151smeared case above except that the weight function used is a Gaussian. Thus 
     152Equation 6 becomes 
    134153 
    135154.. image:: sm_image021.gif 
    136155 
    137 Equation 8 
    138  
    139 For all the cases above, the weighting matrix *W* is calculated when the  
    140 smearing 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  
    142 to cover all data points of the smearing computation for a given model and  
    143 for a given slit size. The *Norm*  factor is found numerically with the  
    144 weighting matrix, and considered on *Is* computation. 
     156**[Equation 8]** 
    145157 
    146158.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    147159 
    1481602D Smearing 
    149 ^^^^^^^^^^^ 
    150  
    151 The 2D smearing computation is done similar to the 1D pinhole smearing above  
    152 except that the weight function used was the 2D elliptical Gaussian function 
     161----------- 
     162 
     163The 2D smearing computation is performed in a similar fashion to the 1D pinhole 
     164smearing above except that the weight function used is a 2D elliptical Gaussian. 
     165Thus 
    153166 
    154167.. image:: sm_image022.gif 
    155168 
    156 Equation 9 
    157  
    158 In Equation 9, x0 = qcos/theta/ and y0 = qsin/theta/, and the primed axes  
    159 are in the coordinate rotated by an angle /theta/ around the z-axis (below)  
    160 so that x’0= x0cos/theta/+y0sin/theta/ and y’0= -x0sin/theta/+y0cos/theta/. 
    161  
    162 Note that the rotation angle is zero for x-y symmetric elliptical Gaussian  
    163 distribution. The A is a normalization factor. 
     169**[Equation 9]** 
     170 
     171In Equation 9, *x*\ :sub:`0` = *q* cos(|theta|), *y*\ :sub:`0` = *q* sin(|theta|), and 
     172the primed axes, are all in the coordinate rotated by an angle |theta| about 
     173the z-axis (see the figure below) so that *x'*\ :sub:`0` = *x*\ :sub:`0` cos(|theta|) + 
     174*y*\ :sub:`0` sin(|theta|) and *y'*\ :sub:`0` = -*x*\ :sub:`0` sin(|theta|) + 
     175*y*\ :sub:`0` cos(|theta|). Note that the rotation angle is zero for a x-y symmetric 
     176elliptical Gaussian distribution. The *A* is a normalization factor. 
    164177 
    165178.. image:: sm_image023.gif 
    166179 
    167 Now 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/  
    169 and /delta/R, respectively, and it is assumed that I(x’, y’) is constant  
    170 within the bins which in turn becomes 
     180Now we consider a numerical integration where each of the bins in |theta| and *R* are 
     181*evenly* (this is to simplify the equation below) distributed by |bigdelta|\ |theta| 
     182and |bigdelta|\ R, respectively, and it is further assumed that *I(x',y')* is constant 
     183within the bins. Then 
    171184 
    172185.. image:: sm_image024.gif 
    173186 
    174 Equation 10 
    175  
    176 Since we have found the weighting factor on each bin points, it is convenient  
    177 to transform x’-y’ back to x-y coordinate (rotating it by -/theta/ around z  
    178 axis). Then, for the polar symmetric smear 
     187**[Equation 10]** 
     188 
     189Since the weighting factor on each of the bins is known, it is convenient to 
     190transform *x'-y'* back to *x-y* coordinates (by rotating it by -|theta| around the 
     191*z* axis). 
     192 
     193Then, for a polar symmetric smear 
    179194 
    180195.. image:: sm_image025.gif 
    181196 
    182 Equation 11 
     197**[Equation 11]** 
    183198 
    184199where 
     
    186201.. image:: sm_image026.gif 
    187202 
    188 while for the x-y symmetric smear 
     203while for a *x-y* symmetric smear 
    189204 
    190205.. image:: sm_image027.gif 
    191206 
    192 Equation 12 
     207**[Equation 12]** 
    193208 
    194209where 
     
    196211.. image:: sm_image028.gif 
    197212 
    198 Here, the current version of the SasView uses Equation 11 for 2D smearing  
    199 assuming that all the Gaussian weighting functions are aligned in the polar  
    200 coordinate. 
    201  
    202 In the control panel, the higher accuracy indicates more and finer binnng  
    203 points so that it costs more in time. 
    204  
    205 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     213The current version of the SasView uses Equation 11 for 2D smearing, assuming 
     214that all the Gaussian weighting functions are aligned in the polar coordinate. 
     215 
     216.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     217 
     218Weighting & Normalization 
     219------------------------- 
     220 
     221In all the cases above, the weighting matrix *W* is calculated on the first call 
     222to a smearing function, and includes ~60 *q* values (finely and evenly binned) 
     223below (>0) and above the *q* range of data in order to smear all data points for 
     224a given model and slit/pinhole size. The *Norm*  factor is found numerically with the 
     225weighting matrix and applied on the computation of *I*\ :sub:`s`. 
     226 
     227.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     228 
     229.. note::  This help document was last changed by Steve King, 01May2015 
Note: See TracChangeset for help on using the changeset viewer.