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