Changeset f2ea95a in sasview for src/sas/sasgui/perspectives/fitting/media
- Timestamp:
- Jun 16, 2017 12:51:12 PM (8 years ago)
- 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 940d034, fca1f50
- Parents:
- c0ef8da (diff), d9c1551 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/sasgui/perspectives/fitting/media
- Files:
-
- 50 added
- 50 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/media/plugin.rst
r984f3fc r72100ee 538 538 sin, cos, tan, asin, acos, atan: 539 539 Trigonometry functions and inverses, operating on radians. 540 sinh, cos , tanh, asinh, acosh, atanh:540 sinh, cosh, tanh, asinh, acosh, atanh: 541 541 Hyperbolic trigonometry functions. 542 542 atan2(y,x): -
src/sas/sasgui/perspectives/fitting/media/fitting_help.rst
r5295cf5 r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 90 90 *View* option on the menubar, or click on the *Modify* button on the *Fit Page*. 91 91 92 .. image:: cat_fig0. bmp92 .. image:: cat_fig0.png 93 93 94 94 The categorization of all models except the user supplied Plugin Models can be … … 96 96 hidden from view in the drop-down menus. 97 97 98 .. image:: cat_fig1. bmp98 .. image:: cat_fig1.png 99 99 100 100 Changing category … … 105 105 to make the required changes. 106 106 107 .. image:: cat_fig2. bmp107 .. image:: cat_fig2.png 108 108 109 109 To create a category for the selected model, click the *Add* button. In order … … 179 179 GUI using the *New Plugin Model Function*. 180 180 181 .. image:: new_model. bmp181 .. image:: new_model.png 182 182 183 183 When using this feature, be aware that even if your code has errors, including … … 198 198 ^^^^^^^^^^^^^^^^ 199 199 200 .. image:: sum_model. bmp200 .. image:: sum_model.png 201 201 202 202 This option creates a custom Plugin Model of the form:: … … 381 381 382 382 In the bottom left corner of the *Fit Page* is a box displaying the normalised value 383 of the statistical |chi|\ :sup:`2`parameter returned by the optimiser.383 of the statistical $\chi^2$ parameter returned by the optimiser. 384 384 385 385 Now check the box for another model parameter and click *Fit* again. Repeat this … … 387 387 fit of the theory to the experimental data improves the value of 'chi2/Npts' will 388 388 decrease. A good model fit should easily produce values of 'chi2/Npts' that are 389 close to zero, and certainly <100. See :ref:`Assessing_Fit_Quality`.389 close to one, and certainly <100. See :ref:`Assessing_Fit_Quality`. 390 390 391 391 SasView has a number of different optimisers (see the section :ref:`Fitting_Options`). … … 509 509 at the bottom of that panel and *Send To Fitting*. A *BatchPage* will be created. 510 510 511 .. image:: batch_button_area. bmp511 .. image:: batch_button_area.png 512 512 513 513 *NB: The Batch Page can also be created by checking the Batch Mode radio button* … … 531 531 will all appear on one graph. 532 532 533 .. image:: view_button. bmp533 .. image:: view_button.png 534 534 535 535 *NB: In theory, returning to the BatchPage and changing the name of the I(Q)* … … 567 567 bar. 568 568 569 .. image:: restore_batch_window. bmp569 .. image:: restore_batch_window.png 570 570 571 571 Once a batch fit is completed, all model parameters are displayed but *not* … … 583 583 label. 584 584 585 .. image:: edit_menu. bmp585 .. image:: edit_menu.png 586 586 587 587 *NB: If there is an existing Grid Window and another batch fit is performed,* … … 596 596 *Window* menu bar. The loaded parameters will appear in a new table tab. 597 597 598 .. image:: file_menu. bmp598 .. image:: file_menu.png 599 599 600 600 *NB: Saving the Grid Window does not save any experimental data, residuals* … … 614 614 but different labels and units can be entered manually. 615 615 616 .. image:: plot_button. bmp616 .. image:: plot_button.png 617 617 618 618 The *X/Y-axis Selection Range* can be edited manually. The text control box -
src/sas/sasgui/perspectives/fitting/media/mag_help.rst
reca66a1 r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 20 20 -------------------------------- 21 21 22 Magnetic scattering is implemented in five (2D) models 22 Magnetic scattering is implemented in five (2D) models 23 23 24 24 * *sphere* … … 28 28 * *parallelepiped* 29 29 30 In general, the scattering length density (SLD, = |beta|) in each region where the30 In general, the scattering length density (SLD, = $\beta$) in each region where the 31 31 SLD is uniform, is a combination of the nuclear and magnetic SLDs and, for polarised 32 32 neutrons, also depends on the spin states of the neutrons. 33 33 34 For magnetic scattering, only the magnetization component, *M*\ :sub:`perp`,35 perpendicular to the scattering vector *Q*contributes to the the magnetic34 For magnetic scattering, only the magnetization component, $M_\perp$, 35 perpendicular to the scattering vector $Q$ contributes to the the magnetic 36 36 scattering length. 37 37 38 .. image:: mag_vector. bmp38 .. image:: mag_vector.png 39 39 40 40 The magnetic scattering length density is then 41 41 42 .. image:: dm_eq. gif42 .. image:: dm_eq.png 43 43 44 where |gamma| = -1.913 is the gyromagnetic ratio, |mu|\ :sub:`B`is the45 Bohr magneton, *r*\ :sub:`0` is the classical radius of electron, and |sigma|44 where $\gamma = -1.913$ is the gyromagnetic ratio, $\mu_B$ is the 45 Bohr magneton, $r_0$ is the classical radius of electron, and $\sigma$ 46 46 is the Pauli spin. 47 47 … … 53 53 Spin-flips (+ -) and (- +) 54 54 55 .. image:: M_angles_pic. bmp55 .. image:: M_angles_pic.png 56 56 57 If the angles of the *Q* vector and the spin-axis (*x'*) to the *x*-axis are |phi|58 and |theta|\ :sub:`up`, respectively, then, depending on the spin state of the57 If the angles of the $Q$ vector and the spin-axis (*x'*) to the *x*-axis are $\phi$ 58 and $\theta_\text{up}$, respectively, then, depending on the spin state of the 59 59 neutrons, the scattering length densities, including the nuclear scattering 60 length density ( |beta|\ :sub:`N`) are60 length density ($\beta_N$) are 61 61 62 .. image:: sld1. gif62 .. image:: sld1.png 63 63 64 64 when there are no spin-flips, and 65 65 66 .. image:: sld2. gif66 .. image:: sld2.png 67 67 68 68 when there are, and 69 69 70 .. image:: mxp. gif70 .. image:: mxp.png 71 71 72 .. image:: myp. gif72 .. image:: myp.png 73 73 74 .. image:: mzp. gif74 .. image:: mzp.png 75 75 76 .. image:: mqx. gif76 .. image:: mqx.png 77 77 78 .. image:: mqy. gif78 .. image:: mqy.png 79 79 80 Here, *M*\ :sub:`0x`, *M*\ :sub:`0y` and *M*\ :sub:`0z` are the x, y and zcomponents81 of the magnetization vector given in the laboratory xyzframe given by80 Here, $M_{0x}$, $M_{0y}$ and $M_{0z}$ are the $x$, $y$ and $z$ components 81 of the magnetization vector given in the laboratory $xyz$ frame given by 82 82 83 .. image:: m0x_eq. gif83 .. image:: m0x_eq.png 84 84 85 .. image:: m0y_eq. gif85 .. image:: m0y_eq.png 86 86 87 .. image:: m0z_eq. gif87 .. image:: m0z_eq.png 88 88 89 and the magnetization angles |theta|\ :sub:`M` and |phi|\ :sub:`M`are defined in89 and the magnetization angles $\theta_M$ and $\phi_M$ are defined in 90 90 the figure above. 91 91 … … 93 93 94 94 =========== ================================================================ 95 M0_sld = *D*\ :sub:`M` *M*\ :sub:`0`96 Up_theta = |theta|\ :sub:`up`97 M_theta = |theta|\ :sub:`M`98 M_phi = |phi|\ :sub:`M`95 M0_sld = $D_M M_0$ 96 Up_theta = $\theta_\text{up}$ 97 M_theta = $\theta_M$ 98 M_phi = $\phi_M$ 99 99 Up_frac_i = (spin up)/(spin up + spin down) neutrons *before* the sample 100 100 Up_frac_f = (spin up)/(spin up + spin down) neutrons *after* the sample -
src/sas/sasgui/perspectives/fitting/media/pd_help.rst
rb64b87c r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 24 24 form factor is normalized by the average particle volume such that 25 25 26 *P(q) = scale* * \ <F*\F> / *V + bkg* 26 .. math:: 27 27 28 where F is the scattering amplitude and the \<\> denote an average over the size 29 distribution. 28 P(q) = \text{scale} \langle F^*F rangle V + \text{background} 29 30 where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an average 31 over the size distribution. 30 32 31 33 Users should note that this computation is very intensive. Applying polydispersion … … 57 59 .. image:: pd_image001.png 58 60 59 where *xmean* is the mean of the distribution, *w* is the half-width, and *Norm* is a60 normalization factor which is determined during the numerical calculation.61 where $x_{mean}$ is the mean of the distribution, $w$ is the half-width, and $Norm$ 62 is a normalization factor which is determined during the numerical calculation. 61 63 62 Note that the standard deviation and the half width *w*are different!64 Note that the standard deviation and the half width $w$ are different! 63 65 64 66 The standard deviation is … … 81 83 .. image:: pd_image005.png 82 84 83 where *xmean* is the mean of the distribution and *Norm*is a normalization factor85 where $x_{mean}$ is the mean of the distribution and $Norm$ is a normalization factor 84 86 which is determined during the numerical calculation. 85 87 … … 100 102 .. image:: pd_image007.png 101 103 102 where |mu|\ =ln(*xmed*), *xmed*is the median value of the distribution, and103 *Norm*is a normalization factor which will be determined during the numerical104 where $\mu=\ln(x_{med})$, $x_{med}$ is the median value of the distribution, and 105 $Norm$ is a normalization factor which will be determined during the numerical 104 106 calculation. 105 107 … … 107 109 size parameter in the *FitPage*, for example, radius = 60. 108 110 109 The polydispersity is given by |sigma|111 The polydispersity is given by $\sigma$ 110 112 111 113 .. image:: pd_image008.png … … 115 117 .. image:: pd_image009.png 116 118 117 The mean value is given by *xmean*\ =exp(|mu|\ +p\ :sup:`2`\ /2). The peak value118 is given by *xpeak*\ =exp(|mu|-p\ :sup:`2`\ ).119 The mean value is given by $x_{mean} =\exp(\mu + p^2 /2)$. The peak value 120 is given by $x_{peak} =\exp(\mu-p^2)$. 119 121 120 122 .. image:: pd_image010.jpg 121 123 122 This distribution function spreads more, and the peak shifts to the left, as *p*124 This distribution function spreads more, and the peak shifts to the left, as $p$ 123 125 increases, requiring higher values of Nsigmas and Npts. 124 126 … … 132 134 .. image:: pd_image011.png 133 135 134 where *xmean* is the mean of the distribution and *Norm*is a normalization factor135 which is determined during the numerical calculation, and *z*is a measure of the136 where $x_{mean}$ is the mean of the distribution and $Norm$ is a normalization factor 137 which is determined during the numerical calculation, and $z$ is a measure of the 136 138 width of the distribution such that 137 139 138 z = (1-p\ :sup:`2`\ ) / p\ :sup:`2` 140 .. math:: 141 142 z = (1-p^2 ) / p^2 139 143 140 144 The polydispersity is … … 156 160 157 161 This user-definable distribution should be given as as a simple ASCII text file 158 where the array is defined by two columns of numbers: *x* and *f(x)*. The *f(x)*162 where the array is defined by two columns of numbers: $x$ and $f(x)$. The $f(x)$ 159 163 will be normalized by SasView during the computation. 160 164 … … 172 176 173 177 SasView only uses these array values during the computation, therefore any mean 174 value of the parameter represented by *x*present in the *FitPage*178 value of the parameter represented by $x$ present in the *FitPage* 175 179 will be ignored. 176 180 … … 181 185 182 186 Many commercial Dynamic Light Scattering (DLS) instruments produce a size 183 polydispersity parameter, sometimes even given the symbol *p*! This parameter is187 polydispersity parameter, sometimes even given the symbol $p$! This parameter is 184 188 defined as the relative standard deviation coefficient of variation of the size 185 189 distribution and is NOT the same as the polydispersity parameters in the Lognormal -
src/sas/sasgui/perspectives/fitting/media/residuals_help.rst
r7805458 rdf1a6ed 18 18 also provides two other measures of the quality of a fit: 19 19 20 * |chi|\ :sup:`2`(or 'Chi2'; pronounced 'chi-squared')20 * $\chi^2$ (or 'Chi2'; pronounced 'chi-squared') 21 21 * *Residuals* 22 22 … … 32 32 *Npts* such that 33 33 34 *Chi2/Npts* = { SUM[(*Y_i* - *Y_theory_i*)^2 / (*Y_error_i*)^2] } / *Npts* 34 .. math:: 35 35 36 This differs slightly from what is sometimes called the 'reduced chi-squared' 36 \chi^2/N_{pts} = \sum[(Y_i - Y_{theory}_i)^2 / (Y_error_i)^2] / N_{pts} 37 38 This differs slightly from what is sometimes called the 'reduced $\chi^2$' 37 39 because it does not take into account the number of fitting parameters (to 38 calculate the number of 'degrees of freedom'), but the 'normalized chi-squared'39 and the 'reduced chi-squared' are very close to each other when *Npts* >> number of40 parameters.40 calculate the number of 'degrees of freedom'), but the 'normalized $\chi^2$ 41 and the 'reduced $\chi^2$ are very close to each other when $N_{pts} \gg 42 \text{number of parameters}. 41 43 42 For a good fit, *Chi2/Npts* tends to 0.44 For a good fit, $\chi^2/N_{pts}$ tends to 1. 43 45 44 *Chi2/Npts*is sometimes referred to as the 'goodness-of-fit' parameter.46 $\chi^2/N_{pts}$ is sometimes referred to as the 'goodness-of-fit' parameter. 45 47 46 48 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 53 55 value and its *true* value is its error). 54 56 55 *SasView* calculates 'normalized residuals', *R_i*, for each data point in the57 *SasView* calculates 'normalized residuals', $R_i$, for each data point in the 56 58 fit: 57 59 58 *R_i* = (*Y_i* - *Y_theory_i*) / (*Y_err_i*) 60 .. math:: 59 61 60 For a good fit, *R_i* ~ 0. 62 R_i = (Y_i - Y_theory_i) / (Y_err_i) 63 64 For a good fit, $R_i \sim 0$. 61 65 62 66 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
src/sas/sasgui/perspectives/fitting/media/sm_help.rst
r27aabc1 r5ed76f8 4 4 .. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 5 5 6 .. |inlineimage004| image:: sm_image004. gif7 .. |inlineimage005| image:: sm_image005. gif8 .. |inlineimage008| image:: sm_image008. gif9 .. |inlineimage009| image:: sm_image009. gif10 .. |inlineimage010| image:: sm_image010. gif11 .. |inlineimage011| image:: sm_image011. gif12 .. |inlineimage012| image:: sm_image012. gif13 .. |inlineimage018| image:: sm_image018. gif14 .. |inlineimage019| image:: sm_image019. gif6 .. |inlineimage004| image:: sm_image004.png 7 .. |inlineimage005| image:: sm_image005.png 8 .. |inlineimage008| image:: sm_image008.png 9 .. |inlineimage009| image:: sm_image009.png 10 .. |inlineimage010| image:: sm_image010.png 11 .. |inlineimage011| image:: sm_image011.png 12 .. |inlineimage012| image:: sm_image012.png 13 .. |inlineimage018| image:: sm_image018.png 14 .. |inlineimage019| image:: sm_image019.png 15 15 16 16 … … 20 20 ================== 21 21 22 Sometimes the instrumental geometry used to acquire the experimental data has 23 an impact on the clarity of features in the reduced scattering curve. For 24 example, peaks or fringes might be slightly broadened. This is known as 25 *Q resolution smearing*. To compensate for this effect one can either try and 26 remove the resolution contribution - a process called *desmearing* - or add the 27 resolution contribution into a model calculation/simulation (which by definition 28 will be exact) to make it more representative of what has been measured 22 Sometimes the instrumental geometry used to acquire the experimental data has 23 an impact on the clarity of features in the reduced scattering curve. For 24 example, peaks or fringes might be slightly broadened. This is known as 25 *Q resolution smearing*. To compensate for this effect one can either try and 26 remove the resolution contribution - a process called *desmearing* - or add the 27 resolution contribution into a model calculation/simulation (which by definition 28 will be exact) to make it more representative of what has been measured 29 29 experimentally - a process called *smearing*. SasView will do the latter. 30 30 31 Both smearing and desmearing rely on functions to describe the resolution 31 Both smearing and desmearing rely on functions to describe the resolution 32 32 effect. SasView provides three smearing algorithms: 33 33 … … 36 36 * *2D Smearing* 37 37 38 SasView also has an option to use Q resolution data (estimated at the time of38 SasView also has an option to use $Q$ resolution data (estimated at the time of 39 39 data reduction) supplied in a reduced data file: the *Use dQ data* radio button. 40 40 … … 43 43 dQ Smearing 44 44 ----------- 45 46 If this option is checked, SasView will assume that the supplied dQ values45 46 If this option is checked, SasView will assume that the supplied $dQ$ values 47 47 represent the standard deviations of Gaussian functions. 48 48 … … 57 57 The slit-smeared scattering intensity is defined by 58 58 59 .. image:: sm_image002. gif59 .. image:: sm_image002.png 60 60 61 61 where *Norm* is given by 62 62 63 .. image:: sm_image003. gif63 .. image:: sm_image003.png 64 64 65 65 **[Equation 1]** 66 66 67 The functions |inlineimage004| and |inlineimage005|68 refer to the slit width weighting function and the slit height weighting 69 determined at the given *q*point, respectively. It is assumed that the weighting67 The functions $W_v(v)$ and $W_u(u)$ 68 refer to the slit width weighting function and the slit height weighting 69 determined at the given $q$ point, respectively. It is assumed that the weighting 70 70 function is described by a rectangular function, such that 71 71 72 .. image:: sm_image006. gif72 .. image:: sm_image006.png 73 73 74 74 **[Equation 2]** … … 76 76 and 77 77 78 .. image:: sm_image007. gif78 .. image:: sm_image007.png 79 79 80 80 **[Equation 3]** 81 81 82 so that |inlineimage008| |inlineimage009| for |inlineimage010| and *u*\ . 83 84 Here |inlineimage011| and |inlineimage012| stand for 85 the slit height (FWHM/2) and the slit width (FWHM/2) in *q* space. 82 so that $\Delta q_\alpha = \int_0^\infty d\alpha W_\alpha(\alpha)$ 83 for $\alpha = v$ and $u$. 84 85 Here $\Delta q_u$ and $\Delta q_v$ stand for 86 the slit height (FWHM/2) and the slit width (FWHM/2) in $q$ space. 86 87 87 88 This simplifies the integral in Equation 1 to 88 89 89 .. image:: sm_image013. gif90 .. image:: sm_image013.png 90 91 91 92 **[Equation 4]** 92 93 93 which may be solved numerically, depending on the nature of |inlineimage011| and |inlineimage012| . 94 which may be solved numerically, depending on the nature of 95 $\Delta q_u$ and $\Delta q_v$. 94 96 95 97 Solution 1 96 98 ^^^^^^^^^^ 97 99 98 **For ** |inlineimage012| **= 0 and** |inlineimage011| **= constant.**99 100 .. image:: sm_image016. gif101 102 For discrete *q* values, at the *q* values of the data points and at the *q*103 values extended up to *q*\ :sub:`N`\ = *q*\ :sub:`i` + |inlineimage011|the smeared100 **For $\Delta q_v= 0$ and $\Delta q_u = \text{constant}$.** 101 102 .. image:: sm_image016.png 103 104 For discrete $q$ values, at the $q$ values of the data points and at the $q$ 105 values extended up to $q_N = q_i + \Delta q_u$ the smeared 104 106 intensity can be approximately calculated as 105 107 106 .. image:: sm_image017. gif108 .. image:: sm_image017.png 107 109 108 110 **[Equation 5]** 109 111 110 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *i* or *j* > *N-1*.112 where |inlineimage018| = 0 for $I_s$ when $j < i$ or $j > N-1$. 111 113 112 114 Solution 2 113 115 ^^^^^^^^^^ 114 116 115 **For ** |inlineimage012| **= constant and** |inlineimage011| **= 0.**117 **For $\Delta q_v = \text{constant}$ and $\Delta q_u= 0$.** 116 118 117 119 Similar to Case 1 118 120 119 |inlineimage019| for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012|121 |inlineimage019| for $q_p = q_i - \Delta q_v$ and $q_N = q_i + \Delta q_v$ 120 122 121 123 **[Equation 6]** 122 124 123 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*.125 where |inlineimage018| = 0 for $I_s$ when $j < p$ or $j > N-1$. 124 126 125 127 Solution 3 126 128 ^^^^^^^^^^ 127 129 128 **For ** |inlineimage011| **= constant and** |inlineimage011| **= constant.**130 **For $\Delta q_u = \text{constant}$ and $\Delta q_v = \text{constant}$.** 129 131 130 132 In this case, the best way is to perform the integration of Equation 1 … … 138 140 numerical integration for the slit width. Then 139 141 140 .. image:: sm_image020. gif142 .. image:: sm_image020.png 141 143 142 144 **[Equation 7]** 143 145 144 for *q*\ :sub:`p` = *q*\ :sub:`i` - |inlineimage012| and *q*\ :sub:`N` = *q*\ :sub:`i` + |inlineimage012| 145 146 where |inlineimage018| = 0 for *I*\ :sub:`s` when *j* < *p* or *j* > *N-1*. 146 for *q_p = q_i - \Delta q_v$ and $q_N = q_i + \Delta q_v$ 147 where |inlineimage018| = 0 for *I_s$ when $j < p$ or $j > N-1$. 147 148 148 149 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 158 159 Equation 6 becomes 159 160 160 .. image:: sm_image021. gif161 .. image:: sm_image021.png 161 162 162 163 **[Equation 8]** … … 171 172 Thus 172 173 173 .. image:: sm_image022. gif174 .. image:: sm_image022.png 174 175 175 176 **[Equation 9]** 176 177 177 In Equation 9, *x*\ :sub:`0` = *q* cos(|theta|), *y*\ :sub:`0` = *q* sin(|theta|), and 178 the primed axes, are all in the coordinate rotated by an angle |theta| about 179 the z-axis (see the figure below) so that *x'*\ :sub:`0` = *x*\ :sub:`0` cos(|theta|) + 180 *y*\ :sub:`0` sin(|theta|) and *y'*\ :sub:`0` = -*x*\ :sub:`0` sin(|theta|) + 181 *y*\ :sub:`0` cos(|theta|). Note that the rotation angle is zero for a x-y symmetric 182 elliptical Gaussian distribution. The *A* is a normalization factor. 183 184 .. image:: sm_image023.gif 185 186 Now we consider a numerical integration where each of the bins in |theta| and *R* are 187 *evenly* (this is to simplify the equation below) distributed by |bigdelta|\ |theta| 188 and |bigdelta|\ R, respectively, and it is further assumed that *I(x',y')* is constant 178 In Equation 9, $x_0 = q \cos(\theta)$, $y_0 = q \sin(\theta)$, and 179 the primed axes, are all in the coordinate rotated by an angle $\theta$ about 180 the z-axis (see the figure below) so that 181 $x'_0 = x_0 \cos(\theta) + y_0 \sin(\theta)$ and 182 $y'_0 = -x_0 \sin(\theta) + y_0 \cos(\theta)$. 183 Note that the rotation angle is zero for a $xy$ symmetric 184 elliptical Gaussian distribution. The $A$ is a normalization factor. 185 186 .. image:: sm_image023.png 187 188 Now we consider a numerical integration where each of the bins in $\theta$ and $R$ are 189 *evenly* (this is to simplify the equation below) distributed by $\Delta \theta$ 190 and $\Delta R$, respectively, and it is further assumed that $I(x',y')$ is constant 189 191 within the bins. Then 190 192 191 .. image:: sm_image024. gif193 .. image:: sm_image024.png 192 194 193 195 **[Equation 10]** 194 196 195 197 Since the weighting factor on each of the bins is known, it is convenient to 196 transform *x'-y'* back to *x-y* coordinates (by rotating it by -|theta|around the197 *z*axis).198 transform $x'y'$ back to $xy$ coordinates (by rotating it by $-\theta$ around the 199 $z$ axis). 198 200 199 201 Then, for a polar symmetric smear 200 202 201 .. image:: sm_image025. gif203 .. image:: sm_image025.png 202 204 203 205 **[Equation 11]** … … 205 207 where 206 208 207 .. image:: sm_image026. gif208 209 while for a *x-y*symmetric smear210 211 .. image:: sm_image027. gif209 .. image:: sm_image026.png 210 211 while for a $xy$ symmetric smear 212 213 .. image:: sm_image027.png 212 214 213 215 **[Equation 12]** … … 215 217 where 216 218 217 .. image:: sm_image028. gif219 .. image:: sm_image028.png 218 220 219 221 The current version of the SasView uses Equation 11 for 2D smearing, assuming … … 225 227 ------------------------- 226 228 227 In all the cases above, the weighting matrix *W*is calculated on the first call228 to a smearing function, and includes ~60 *q*values (finely and evenly binned)229 below (>0) and above the *q*range of data in order to smear all data points for230 a given model and slit/pinhole size. The *Norm*factor is found numerically with the231 weighting matrix and applied on the computation of *I*\ :sub:`s`.229 In all the cases above, the weighting matrix $W$ is calculated on the first call 230 to a smearing function, and includes ~60 $q$ values (finely and evenly binned) 231 below (>0) and above the $q$ range of data in order to smear all data points for 232 a given model and slit/pinhole size. The $Norm$ factor is found numerically with the 233 weighting matrix and applied on the computation of $I_s$. 232 234 233 235 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Note: See TracChangeset
for help on using the changeset viewer.