source: sasmodels/doc/guide/pd/polydispersity.rst @ 0d5dc05

Last change on this file since 0d5dc05 was d089a00, checked in by smk78, 6 years ago

Minor formatting changes in polydispersity.rst

  • Property mode set to 100644
File size: 13.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
[97d172c]10Polydispersity & Orientational Distributions
11--------------------------------------------
[990d8df]12
[97d172c]13For some models we can calculate the average intensity for a population of
14particles that possess size and/or orientational (ie, angular) distributions.
15In SasView we call the former *polydispersity* but use the parameter *PD* to
16parameterise both. In other words, the meaning of *PD* in a model depends on
17the actual parameter it is being applied too.
18
19The resultant intensity is then normalized by the average particle volume such
20that
[990d8df]21
22.. math::
23
24  P(q) = \text{scale} \langle F^* F \rangle / V + \text{background}
25
[d712a0f]26where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an
[97d172c]27average over the distribution $f(x; \bar x, \sigma)$, giving
[d712a0f]28
29.. math::
30
31  P(q) = \frac{\text{scale}}{V} \int_\mathbb{R}
32  f(x; \bar x, \sigma) F^2(q, x)\, dx + \text{background}
[990d8df]33
[ed5b109]34Each distribution is characterized by a center value $\bar x$ or
35$x_\text{med}$, a width parameter $\sigma$ (note this is *not necessarily*
[97d172c]36the standard deviation, so read the description of the distribution carefully),
37the number of sigmas $N_\sigma$ to include from the tails of the distribution,
38and the number of points used to compute the average. The center of the
39distribution is set by the value of the model parameter.
[ed5b109]40
[29afc50]41The distribution width applied to *volume* (ie, shape-describing) parameters
42is relative to the center value such that $\sigma = \mathrm{PD} \cdot \bar x$.
[97d172c]43However, the distribution width applied to *orientation* parameters is just
44$\sigma = \mathrm{PD}$.
[ed5b109]45
46$N_\sigma$ determines how far into the tails to evaluate the distribution,
47with larger values of $N_\sigma$ required for heavier tailed distributions.
[990d8df]48The scattering in general falls rapidly with $qr$ so the usual assumption
[d712a0f]49that $f(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)f(r - 3\sigma_r)$
[990d8df]50will not contribute much to the average may not hold when particles are large.
51This, too, will require increasing $N_\sigma$.
52
53Users should note that the averaging computation is very intensive. Applying
[97d172c]54polydispersion and/or orientational distributions to multiple parameters at
55the same time, or increasing the number of points in the distribution, will
56require patience! However, the calculations are generally more robust with
57more data points or more angles.
[990d8df]58
[22279a4]59The following distribution functions are provided:
[990d8df]60
[75e4319]61*  *Uniform Distribution*
[5026e05]62*  *Rectangular Distribution*
[990d8df]63*  *Gaussian Distribution*
[5026e05]64*  *Boltzmann Distribution*
[990d8df]65*  *Lognormal Distribution*
66*  *Schulz Distribution*
67*  *Array Distribution*
68
69These are all implemented as *number-average* distributions.
70
[5026e05]71Additional distributions are under consideration.
[990d8df]72
[86bb5df]73**Beware: when the Polydispersity & Orientational Distribution panel in SasView is**
74**first opened, the default distribution for all parameters is the Gaussian Distribution.**
75**This may not be suitable. See Suggested Applications below.**
76
[d712a0f]77.. note:: In 2009 IUPAC decided to introduce the new term 'dispersity' to replace
78           the term 'polydispersity' (see `Pure Appl. Chem., (2009), 81(2),
79           351-353 <http://media.iupac.org/publications/pac/2009/pdf/8102x0351.pdf>`_
[97d172c]80           in order to make the terminology describing distributions of chemical
81           properties unambiguous. However, these terms are unrelated to the
82           proportional size distributions and orientational distributions used in
83           SasView models.
[d712a0f]84
[5026e05]85Suggested Applications
86^^^^^^^^^^^^^^^^^^^^^^
[990d8df]87
[97d172c]88If applying polydispersion to parameters describing particle sizes, consider using
[5026e05]89the Lognormal or Schulz distributions.
[990d8df]90
[ed5b109]91If applying polydispersion to parameters describing interfacial thicknesses
[97d172c]92or angular orientations, consider using the Gaussian or Boltzmann distributions.
[990d8df]93
[29afc50]94If applying polydispersion to parameters describing angles, use the Uniform
95distribution. Beware of using distributions that are always positive (eg, the
96Lognormal) because angles can be negative!
97
[5026e05]98The array distribution allows a user-defined distribution to be applied.
[990d8df]99
[5026e05]100.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
[990d8df]101
[5026e05]102Uniform Distribution
103^^^^^^^^^^^^^^^^^^^^
[990d8df]104
[5026e05]105The Uniform Distribution is defined as
[990d8df]106
[f4ae8c4]107.. math::
[990d8df]108
[f4ae8c4]109    f(x) = \frac{1}{\text{Norm}}
110    \begin{cases}
111        1 & \text{for } |x - \bar x| \leq \sigma \\
112        0 & \text{for } |x - \bar x| > \sigma
113    \end{cases}
[990d8df]114
[f4ae8c4]115where $\bar x$ ($x_\text{mean}$ in the figure) is the mean of the
116distribution, $\sigma$ is the half-width, and *Norm* is a normalization
117factor which is determined during the numerical calculation.
[990d8df]118
[f4ae8c4]119The polydispersity in sasmodels is given by
[990d8df]120
[f4ae8c4]121.. math:: \text{PD} = \sigma / \bar x
[92d330fd]122
[f4ae8c4]123.. figure:: pd_uniform.jpg
[3d58247]124
[f4ae8c4]125    Uniform distribution.
[990d8df]126
[5026e05]127The value $N_\sigma$ is ignored for this distribution.
128
129.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
130
131Rectangular Distribution
[75e4319]132^^^^^^^^^^^^^^^^^^^^^^^^
133
[5026e05]134The Rectangular Distribution is defined as
[75e4319]135
[f4ae8c4]136.. math::
[75e4319]137
[f4ae8c4]138    f(x) = \frac{1}{\text{Norm}}
139    \begin{cases}
140        1 & \text{for } |x - \bar x| \leq w \\
141        0 & \text{for } |x - \bar x| > w
142    \end{cases}
[75e4319]143
[f4ae8c4]144where $\bar x$ ($x_\text{mean}$ in the figure) is the mean of the
145distribution, $w$ is the half-width, and *Norm* is a normalization
146factor which is determined during the numerical calculation.
[75e4319]147
[f4ae8c4]148Note that the standard deviation and the half width $w$ are different!
[75e4319]149
[f4ae8c4]150The standard deviation is
[75e4319]151
[f4ae8c4]152.. math:: \sigma = w / \sqrt{3}
[75e4319]153
[f4ae8c4]154whilst the polydispersity in sasmodels is given by
[92d330fd]155
[f4ae8c4]156.. math:: \text{PD} = \sigma / \bar x
[5026e05]157
[f4ae8c4]158.. figure:: pd_rectangular.jpg
[5026e05]159
[f4ae8c4]160    Rectangular distribution.
[ed5b109]161
[f4ae8c4]162.. note:: The Rectangular Distribution is deprecated in favour of the
163            Uniform Distribution above and is described here for backwards
164            compatibility with earlier versions of SasView only.
[75e4319]165
[990d8df]166.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
167
168Gaussian Distribution
169^^^^^^^^^^^^^^^^^^^^^
170
171The Gaussian Distribution is defined as
172
[f4ae8c4]173.. math::
[5026e05]174
[f4ae8c4]175    f(x) = \frac{1}{\text{Norm}}
176            \exp\left(-\frac{(x - \bar x)^2}{2\sigma^2}\right)
[990d8df]177
[f4ae8c4]178where $\bar x$ ($x_\text{mean}$ in the figure) is the mean of the
179distribution and *Norm* is a normalization factor which is determined
180during the numerical calculation.
[990d8df]181
[f4ae8c4]182The polydispersity in sasmodels is given by
[990d8df]183
[f4ae8c4]184.. math:: \text{PD} = \sigma / \bar x
[5026e05]185
[f4ae8c4]186.. figure:: pd_gaussian.jpg
[5026e05]187
[f4ae8c4]188    Normal distribution.
[5026e05]189
190.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
191
192Boltzmann Distribution
193^^^^^^^^^^^^^^^^^^^^^^
194
195The Boltzmann Distribution is defined as
[990d8df]196
[f4ae8c4]197.. math::
[990d8df]198
[f4ae8c4]199    f(x) = \frac{1}{\text{Norm}}
200            \exp\left(-\frac{ | x - \bar x | }{\sigma}\right)
[990d8df]201
[f4ae8c4]202where $\bar x$ ($x_\text{mean}$ in the figure) is the mean of the
203distribution and *Norm* is a normalization factor which is determined
204during the numerical calculation.
[5026e05]205
[f4ae8c4]206The width is defined as
[5026e05]207
[f4ae8c4]208.. math:: \sigma=\frac{k T}{E}
[5026e05]209
[f4ae8c4]210which is the inverse Boltzmann factor, where $k$ is the Boltzmann constant,
211$T$ the temperature in Kelvin and $E$ a characteristic energy per particle.
[5026e05]212
[f4ae8c4]213.. figure:: pd_boltzmann.jpg
[5026e05]214
[f4ae8c4]215    Boltzmann distribution.
[990d8df]216
217.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
218
219Lognormal Distribution
220^^^^^^^^^^^^^^^^^^^^^^
221
[ed5b109]222The Lognormal Distribution describes a function of $x$ where $\ln (x)$ has
223a normal distribution. The result is a distribution that is skewed towards
224larger values of $x$.
[5026e05]225
[990d8df]226The Lognormal Distribution is defined as
227
[f4ae8c4]228.. math::
[990d8df]229
[f4ae8c4]230    f(x) = \frac{1}{\text{Norm}}\frac{1}{x\sigma}
231            \exp\left(-\frac{1}{2}
232                        \bigg(\frac{\ln(x) - \mu}{\sigma}\bigg)^2\right)
[990d8df]233
[f4ae8c4]234where *Norm* is a normalization factor which will be determined during
235the numerical calculation, $\mu=\ln(x_\text{med})$ and $x_\text{med}$
236is the *median* value of the *lognormal* distribution, but $\sigma$ is
237a parameter describing the width of the underlying *normal* distribution.
[ed5b109]238
[f4ae8c4]239$x_\text{med}$ will be the value given for the respective size parameter
240in sasmodels, for example, *radius=60*.
[990d8df]241
[f4ae8c4]242The polydispersity in sasmodels is given by
[990d8df]243
[29afc50]244.. math:: \text{PD} = \sigma = p / x_\text{med}
[990d8df]245
[29afc50]246The mean value of the distribution is given by $\bar x = \exp(\mu+ \sigma^2/2)$
247and the peak value by $\max x = \exp(\mu - \sigma^2)$.
[990d8df]248
[f4ae8c4]249The variance (the square of the standard deviation) of the *lognormal*
250distribution is given by
[990d8df]251
[f4ae8c4]252.. math::
[990d8df]253
[f4ae8c4]254    \nu = [\exp({\sigma}^2) - 1] \exp({2\mu + \sigma^2})
[990d8df]255
[f4ae8c4]256Note that larger values of PD might need a larger number of points
257and $N_\sigma$.
[ed5b109]258
[f4ae8c4]259.. figure:: pd_lognormal.jpg
[990d8df]260
[29afc50]261    Lognormal distribution for PD=0.1.
[990d8df]262
[5026e05]263For further information on the Lognormal distribution see:
[ed5b109]264http://en.wikipedia.org/wiki/Log-normal_distribution and
[5026e05]265http://mathworld.wolfram.com/LogNormalDistribution.html
[990d8df]266
267.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
268
269Schulz Distribution
270^^^^^^^^^^^^^^^^^^^
271
[ed5b109]272The Schulz (sometimes written Schultz) distribution is similar to the
273Lognormal distribution, in that it is also skewed towards larger values of
274$x$, but which has computational advantages over the Lognormal distribution.
[5026e05]275
[990d8df]276The Schulz distribution is defined as
277
[f4ae8c4]278.. math::
[990d8df]279
[f4ae8c4]280    f(x) = \frac{1}{\text{Norm}} (z+1)^{z+1}(x/\bar x)^z
281            \frac{\exp[-(z+1)x/\bar x]}{\bar x\Gamma(z+1)}
[990d8df]282
[f4ae8c4]283where $\bar x$ ($x_\text{mean}$ in the figure) is the mean of the
284distribution, *Norm* is a normalization factor which is determined
285during the numerical calculation, and $z$ is a measure of the width
286of the distribution such that
[990d8df]287
[f4ae8c4]288.. math:: z = (1-p^2) / p^2
[990d8df]289
[f4ae8c4]290where $p$ is the polydispersity in sasmodels given by
[990d8df]291
[f4ae8c4]292.. math:: PD = p = \sigma / \bar x
[990d8df]293
[f4ae8c4]294and $\sigma$ is the RMS deviation from $\bar x$.
[ed5b109]295
[f4ae8c4]296Note that larger values of PD might need a larger number of points
297and $N_\sigma$. For example, for PD=0.7 with radius=60 |Ang|, at least
298Npts>=160 and Nsigmas>=15 are required.
[990d8df]299
[f4ae8c4]300.. figure:: pd_schulz.jpg
[990d8df]301
[f4ae8c4]302    Schulz distribution.
[990d8df]303
304For further information on the Schulz distribution see:
[5026e05]305M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461 and
[ed5b109]306M Kotlarchyk, RB Stephens, and JS Huang, *J Phys Chem*, (1988), 92, 1533
[990d8df]307
308.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
309
310Array Distribution
311^^^^^^^^^^^^^^^^^^
312
[a5a12ca]313This user-definable distribution should be given as a simple ASCII text
[990d8df]314file where the array is defined by two columns of numbers: $x$ and $f(x)$.
315The $f(x)$ will be normalized to 1 during the computation.
316
317Example of what an array distribution file should look like:
318
319====  =====
320 30    0.1
321 32    0.3
322 35    0.4
323 36    0.5
324 37    0.6
325 39    0.7
326 41    0.9
327====  =====
328
329Only these array values are used computation, therefore the parameter value
330given for the model will have no affect, and will be ignored when computing
331the average.  This means that any parameter with an array distribution will
[a5a12ca]332not be fitable.
333
334.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
335
[990d8df]336Note about DLS polydispersity
337^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
338
[97d172c]339Several measures of polydispersity abound in Dynamic Light Scattering (DLS) and
340it should not be assumed that any of the following can be simply equated with
341the polydispersity *PD* parameter used in SasView.
342
[d089a00]343The dimensionless **Polydispersity Index (PI)** is a measure of the width of the
[97d172c]344distribution of autocorrelation function decay rates (*not* the distribution of
345particle sizes itself, though the two are inversely related) and is defined by
346ISO 22412:2017 as
[990d8df]347
[5026e05]348.. math::
349
[97d172c]350    PI = \mu_{2} / \bar \Gamma^2
351
352where $\mu_\text{2}$ is the second cumulant, and $\bar \Gamma^2$ is the
353intensity-weighted average value, of the distribution of decay rates.
354
355*If the distribution of decay rates is Gaussian* then
356
357.. math::
358
359    PI = \sigma^2 / 2\bar \Gamma^2
360
[d089a00]361where $\sigma$ is the standard deviation, allowing a **Relative Polydispersity (RP)** 
[97d172c]362to be defined as
363
364.. math::
365
[86bb5df]366    RP = \sigma / \bar \Gamma = \sqrt{2 \cdot PI}
[97d172c]367
368PI values smaller than 0.05 indicate a highly monodisperse system. Values
369greater than 0.7 indicate significant polydispersity.
370
[d089a00]371The **size polydispersity P-parameter** is defined as the relative standard
[97d172c]372deviation coefficient of variation 
373
374.. math::
375
376    P = \sqrt\nu / \bar R
377
378where $\nu$ is the variance of the distribution and $\bar R$ is the mean
379value of $R$. Here, the product $P \bar R$ is *equal* to the standard
380deviation of the Lognormal distribution.
[5026e05]381
[97d172c]382P values smaller than 0.13 indicate a monodisperse system.
[5026e05]383
[990d8df]384For more information see:
[d089a00]385
386`ISO 22412:2017, International Standards Organisation (2017) <https://www.iso.org/standard/65410.html>`_.
387
388`Polydispersity: What does it mean for DLS and Chromatography <http://www.materials-talks.com/blog/2014/10/23/polydispersity-what-does-it-mean-for-dls-and-chromatography/>`_.
389
390`Dynamic Light Scattering: Common Terms Defined, Whitepaper WP111214. Malvern Instruments (2011) <http://www.biophysics.bioc.cam.ac.uk/wp-content/uploads/2011/02/DLS_Terms_defined_Malvern.pdf>`_.
391
392S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143.
393
[97d172c]394T Allen, in *Particle Size Measurement*, 4th Edition, Chapman & Hall, London (1990).
[990d8df]395
396.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
397
398*Document History*
399
400| 2015-05-01 Steve King
401| 2017-05-08 Paul Kienzle
[5026e05]402| 2018-03-20 Steve King
[29afc50]403| 2018-04-04 Steve King
[97d172c]404| 2018-08-09 Steve King
Note: See TracBrowser for help on using the repository browser.