source: sasmodels/doc/guide/pd/polydispersity.rst @ a66b004

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since a66b004 was a66b004, checked in by Paul Kienzle <pkienzle@…>, 6 years ago

Merge branch 'master' into boltzmann

  • Property mode set to 100644
File size: 8.3 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
[a5a12ca]44The following six distribution functions are provided:
[990d8df]45
46*  *Rectangular Distribution*
[75e4319]47*  *Uniform Distribution*
[990d8df]48*  *Gaussian Distribution*
49*  *Lognormal Distribution*
50*  *Schulz Distribution*
51*  *Array Distribution*
[a5a12ca]52*  *Boltzmann Distribution*
[990d8df]53
54These are all implemented as *number-average* distributions.
55
56.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
57
58Rectangular Distribution
59^^^^^^^^^^^^^^^^^^^^^^^^
60
61The Rectangular Distribution is defined as
62
63.. math::
64
65    f(x) = \frac{1}{\text{Norm}}
66    \begin{cases}
67      1 & \text{for } |x - \bar x| \leq w \\
68      0 & \text{for } |x - \bar x| > w
69    \end{cases}
70
71where $\bar x$ is the mean of the distribution, $w$ is the half-width, and
72*Norm* is a normalization factor which is determined during the numerical
73calculation.
74
75Note that the standard deviation and the half width $w$ are different!
76
77The standard deviation is
78
79.. math:: \sigma = w / \sqrt{3}
80
81whilst the polydispersity is
82
83.. math:: \text{PD} = \sigma / \bar x
84
85.. figure:: pd_rectangular.jpg
86
87    Rectangular distribution.
88
[75e4319]89Uniform Distribution
90^^^^^^^^^^^^^^^^^^^^^^^^
91
92The Uniform Distribution is defined as
93
94    .. math::
95
96        f(x) = \frac{1}{\text{Norm}}
97        \begin{cases}
98          1 & \text{for } |x - \bar x| \leq \sigma \\
99          0 & \text{for } |x - \bar x| > \sigma
100        \end{cases}
101
102    where $\bar x$ is the mean of the distribution, $\sigma$ is the half-width, and
103    *Norm* is a normalization factor which is determined during the numerical
104    calculation.
105
106    Note that the polydispersity is given by
107
108    .. math:: \text{PD} = \sigma / \bar x
109
110    .. figure:: pd_uniform.jpg
111
112        Uniform distribution.
113
[990d8df]114.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
115
116Gaussian Distribution
117^^^^^^^^^^^^^^^^^^^^^
118
119The Gaussian Distribution is defined as
120
121.. math::
122
123    f(x) = \frac{1}{\text{Norm}}
124           \exp\left(-\frac{(x - \bar x)^2}{2\sigma^2}\right)
125
[1f058ea]126where $\bar x$ is the mean of the distribution and *Norm* is a normalization
127factor which is determined during the numerical calculation.
[990d8df]128
129The polydispersity is
130
131.. math:: \text{PD} = \sigma / \bar x
132
133.. figure:: pd_gaussian.jpg
134
135    Normal distribution.
136
137.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
138
139Lognormal Distribution
140^^^^^^^^^^^^^^^^^^^^^^
141
142The Lognormal Distribution is defined as
143
144.. math::
145
146    f(x) = \frac{1}{\text{Norm}}
147           \frac{1}{xp}\exp\left(-\frac{(\ln(x) - \mu)^2}{2p^2}\right)
148
149where $\mu=\ln(x_\text{med})$ when $x_\text{med}$ is the median value of the
150distribution, and *Norm* is a normalization factor which will be determined
151during the numerical calculation.
152
[1f058ea]153The median value for the distribution will be the value given for the
154respective size parameter, for example, *radius=60*.
[990d8df]155
156The polydispersity is given by $\sigma$
157
158.. math:: \text{PD} = p
159
160For the angular distribution
161
162.. math:: p = \sigma / x_\text{med}
163
164The mean value is given by $\bar x = \exp(\mu+ p^2/2)$. The peak value
165is given by $\max x = \exp(\mu - p^2)$.
166
167.. figure:: pd_lognormal.jpg
168
169    Lognormal distribution.
170
171This distribution function spreads more, and the peak shifts to the left, as
172$p$ increases, so it requires higher values of $N_\sigma$ and more points
173in the distribution.
174
175.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
176
177Schulz Distribution
178^^^^^^^^^^^^^^^^^^^
179
180The Schulz distribution is defined as
181
182.. math::
183
184    f(x) = \frac{1}{\text{Norm}}
185           (z+1)^{z+1}(x/\bar x)^z\frac{\exp[-(z+1)x/\bar x]}{\bar x\Gamma(z+1)}
186
187where $\bar x$ is the mean of the distribution and *Norm* is a normalization
188factor which is determined during the numerical calculation, and $z$ is a
189measure of the width of the distribution such that
190
191.. math:: z = (1-p^2) / p^2
192
193The polydispersity is
194
195.. math:: p = \sigma / \bar x
196
197Note that larger values of PD might need larger number of points and $N_\sigma$.
198For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least.
199
200.. figure:: pd_schulz.jpg
201
202    Schulz distribution.
203
204For further information on the Schulz distribution see:
205M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461.
206
207.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
208
209Array Distribution
210^^^^^^^^^^^^^^^^^^
211
[a5a12ca]212This user-definable distribution should be given as a simple ASCII text
[990d8df]213file where the array is defined by two columns of numbers: $x$ and $f(x)$.
214The $f(x)$ will be normalized to 1 during the computation.
215
216Example of what an array distribution file should look like:
217
218====  =====
219 30    0.1
220 32    0.3
221 35    0.4
222 36    0.5
223 37    0.6
224 39    0.7
225 41    0.9
226====  =====
227
228Only these array values are used computation, therefore the parameter value
229given for the model will have no affect, and will be ignored when computing
230the average.  This means that any parameter with an array distribution will
[a5a12ca]231not be fitable.
232
233.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
234
235Boltzmann Distribution
236^^^^^^^^^^^^^^^^^^^^^^
237
238The Boltzmann Distribution is defined as
239
240.. math::
241
242    f(x) = \frac{1}{\text{Norm}}
243           \exp\left(-\frac{ | x - \bar x | }{\sigma}\right)
244
245where $\bar x$ is the mean of the distribution and *Norm* is a normalization
246factor which is determined during the numerical calculation.
247The width is defined as
248
249.. math:: \sigma=\frac{k T}{E}
250
251which is the inverse Boltzmann factor,
252where $k$ is the Boltzmann constant, $T$ the temperature in Kelvin and $E$ a
253characteristic energy per particle.
254
255.. figure:: pd_boltzmann.jpg
256
257    Boltzmann distribution.
[990d8df]258
259.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
260
261Note about DLS polydispersity
262^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
263
264Many commercial Dynamic Light Scattering (DLS) instruments produce a size
[1f058ea]265polydispersity parameter, sometimes even given the symbol $p$\ ! This
[990d8df]266parameter is defined as the relative standard deviation coefficient of
267variation of the size distribution and is NOT the same as the polydispersity
268parameters in the Lognormal and Schulz distributions above (though they all
269related) except when the DLS polydispersity parameter is <0.13.
270
271For more information see:
272S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143
273
274.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
275
276*Document History*
277
278| 2015-05-01 Steve King
279| 2017-05-08 Paul Kienzle
Note: See TracBrowser for help on using the repository browser.