source: sasmodels/doc/guide/pd/polydispersity.rst @ 87a6591

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 87a6591 was eda8b30, checked in by richardh, 7 years ago

further changes to model docs for orientation calcs

  • Property mode set to 100644
File size: 6.9 KB
RevLine 
[990d8df]1.. pd_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.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
7
[eda8b30]8.. _polydispersityhelp:
9
[990d8df]10Polydispersity Distributions
11----------------------------
12
[eda8b30]13With some models in sasmodels we can calculate the average intensity for a
[990d8df]14population of particles that exhibit size and/or orientational
[eda8b30]15polydispersity. The resultant intensity is normalized by the average
[990d8df]16particle volume such that
17
18.. math::
19
20  P(q) = \text{scale} \langle F^* F \rangle / V + \text{background}
21
22where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an
23average over the size distribution.
24
25Each distribution is characterized by its center $\bar x$, its width $\sigma$,
26the number of sigmas $N_\sigma$ to include from the tails, and the number of
27points used to compute the average. The center of the distribution is set by the
28value of the model parameter.  Volume parameters have polydispersity *PD*
29(not to be confused with a molecular weight distributions in polymer science)
30leading to a size distribution of width $\text{PD} = \sigma / \bar x$, but
31orientation parameters use an angular distributions of width $\sigma$.
32$N_\sigma$ determines how far into the tails to evaluate the distribution, with
33larger values of $N_\sigma$ required for heavier tailed distributions.
34The scattering in general falls rapidly with $qr$ so the usual assumption
35that $G(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)G(r - 3\sigma_r)$
36will not contribute much to the average may not hold when particles are large.
37This, too, will require increasing $N_\sigma$.
38
39Users should note that the averaging computation is very intensive. Applying
40polydispersion to multiple parameters at the same time or increasing the
41number of points in the distribution will require patience! However, the
42calculations are generally more robust with more data points or more angles.
43
44The following five distribution functions are provided:
45
46*  *Rectangular Distribution*
47*  *Gaussian Distribution*
48*  *Lognormal Distribution*
49*  *Schulz Distribution*
50*  *Array Distribution*
51
52These are all implemented as *number-average* distributions.
53
54.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
55
56Rectangular Distribution
57^^^^^^^^^^^^^^^^^^^^^^^^
58
59The Rectangular Distribution is defined as
60
61.. math::
62
63    f(x) = \frac{1}{\text{Norm}}
64    \begin{cases}
65      1 & \text{for } |x - \bar x| \leq w \\
66      0 & \text{for } |x - \bar x| > w
67    \end{cases}
68
69where $\bar x$ is the mean of the distribution, $w$ is the half-width, and
70*Norm* is a normalization factor which is determined during the numerical
71calculation.
72
73Note that the standard deviation and the half width $w$ are different!
74
75The standard deviation is
76
77.. math:: \sigma = w / \sqrt{3}
78
79whilst the polydispersity is
80
81.. math:: \text{PD} = \sigma / \bar x
82
83.. figure:: pd_rectangular.jpg
84
85    Rectangular distribution.
86
87.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
88
89Gaussian Distribution
90^^^^^^^^^^^^^^^^^^^^^
91
92The Gaussian Distribution is defined as
93
94.. math::
95
96    f(x) = \frac{1}{\text{Norm}}
97           \exp\left(-\frac{(x - \bar x)^2}{2\sigma^2}\right)
98
[1f058ea]99where $\bar x$ is the mean of the distribution and *Norm* is a normalization
100factor which is determined during the numerical calculation.
[990d8df]101
102The polydispersity is
103
104.. math:: \text{PD} = \sigma / \bar x
105
106.. figure:: pd_gaussian.jpg
107
108    Normal distribution.
109
110.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
111
112Lognormal Distribution
113^^^^^^^^^^^^^^^^^^^^^^
114
115The Lognormal Distribution is defined as
116
117.. math::
118
119    f(x) = \frac{1}{\text{Norm}}
120           \frac{1}{xp}\exp\left(-\frac{(\ln(x) - \mu)^2}{2p^2}\right)
121
122where $\mu=\ln(x_\text{med})$ when $x_\text{med}$ is the median value of the
123distribution, and *Norm* is a normalization factor which will be determined
124during the numerical calculation.
125
[1f058ea]126The median value for the distribution will be the value given for the
127respective size parameter, for example, *radius=60*.
[990d8df]128
129The polydispersity is given by $\sigma$
130
131.. math:: \text{PD} = p
132
133For the angular distribution
134
135.. math:: p = \sigma / x_\text{med}
136
137The mean value is given by $\bar x = \exp(\mu+ p^2/2)$. The peak value
138is given by $\max x = \exp(\mu - p^2)$.
139
140.. figure:: pd_lognormal.jpg
141
142    Lognormal distribution.
143
144This distribution function spreads more, and the peak shifts to the left, as
145$p$ increases, so it requires higher values of $N_\sigma$ and more points
146in the distribution.
147
148.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
149
150Schulz Distribution
151^^^^^^^^^^^^^^^^^^^
152
153The Schulz distribution is defined as
154
155.. math::
156
157    f(x) = \frac{1}{\text{Norm}}
158           (z+1)^{z+1}(x/\bar x)^z\frac{\exp[-(z+1)x/\bar x]}{\bar x\Gamma(z+1)}
159
160where $\bar x$ is the mean of the distribution and *Norm* is a normalization
161factor which is determined during the numerical calculation, and $z$ is a
162measure of the width of the distribution such that
163
164.. math:: z = (1-p^2) / p^2
165
166The polydispersity is
167
168.. math:: p = \sigma / \bar x
169
170Note that larger values of PD might need larger number of points and $N_\sigma$.
171For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least.
172
173.. figure:: pd_schulz.jpg
174
175    Schulz distribution.
176
177For further information on the Schulz distribution see:
178M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461.
179
180.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
181
182Array Distribution
183^^^^^^^^^^^^^^^^^^
184
185This user-definable distribution should be given as as a simple ASCII text
186file where the array is defined by two columns of numbers: $x$ and $f(x)$.
187The $f(x)$ will be normalized to 1 during the computation.
188
189Example of what an array distribution file should look like:
190
191====  =====
192 30    0.1
193 32    0.3
194 35    0.4
195 36    0.5
196 37    0.6
197 39    0.7
198 41    0.9
199====  =====
200
201Only these array values are used computation, therefore the parameter value
202given for the model will have no affect, and will be ignored when computing
203the average.  This means that any parameter with an array distribution will
204not be fittable.
205
206.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
207
208Note about DLS polydispersity
209^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210
211Many commercial Dynamic Light Scattering (DLS) instruments produce a size
[1f058ea]212polydispersity parameter, sometimes even given the symbol $p$\ ! This
[990d8df]213parameter is defined as the relative standard deviation coefficient of
214variation of the size distribution and is NOT the same as the polydispersity
215parameters in the Lognormal and Schulz distributions above (though they all
216related) except when the DLS polydispersity parameter is <0.13.
217
218For more information see:
219S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143
220
221.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
222
223*Document History*
224
225| 2015-05-01 Steve King
226| 2017-05-08 Paul Kienzle
Note: See TracBrowser for help on using the repository browser.