source: sasmodels/doc/guide/pd/polydispersity.rst @ 92d330fd

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 92d330fd was 92d330fd, checked in by dirk, 6 years ago

undo typo in polydispersity docs

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