[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 | |
---|
| 22 | where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an |
---|
| 23 | average over the size distribution. |
---|
| 24 | |
---|
| 25 | Each distribution is characterized by its center $\bar x$, its width $\sigma$, |
---|
| 26 | the number of sigmas $N_\sigma$ to include from the tails, and the number of |
---|
| 27 | points used to compute the average. The center of the distribution is set by the |
---|
| 28 | value of the model parameter. Volume parameters have polydispersity *PD* |
---|
| 29 | (not to be confused with a molecular weight distributions in polymer science) |
---|
| 30 | leading to a size distribution of width $\text{PD} = \sigma / \bar x$, but |
---|
| 31 | orientation parameters use an angular distributions of width $\sigma$. |
---|
| 32 | $N_\sigma$ determines how far into the tails to evaluate the distribution, with |
---|
| 33 | larger values of $N_\sigma$ required for heavier tailed distributions. |
---|
| 34 | The scattering in general falls rapidly with $qr$ so the usual assumption |
---|
| 35 | that $G(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)G(r - 3\sigma_r)$ |
---|
| 36 | will not contribute much to the average may not hold when particles are large. |
---|
| 37 | This, too, will require increasing $N_\sigma$. |
---|
| 38 | |
---|
| 39 | Users should note that the averaging computation is very intensive. Applying |
---|
| 40 | polydispersion to multiple parameters at the same time or increasing the |
---|
| 41 | number of points in the distribution will require patience! However, the |
---|
| 42 | calculations are generally more robust with more data points or more angles. |
---|
| 43 | |
---|
[a5a12ca] | 44 | The 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 | |
---|
| 54 | These are all implemented as *number-average* distributions. |
---|
| 55 | |
---|
| 56 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 57 | |
---|
| 58 | Rectangular Distribution |
---|
| 59 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 60 | |
---|
| 61 | The 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 | |
---|
| 71 | where $\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 |
---|
| 73 | calculation. |
---|
| 74 | |
---|
| 75 | Note that the standard deviation and the half width $w$ are different! |
---|
| 76 | |
---|
| 77 | The standard deviation is |
---|
| 78 | |
---|
| 79 | .. math:: \sigma = w / \sqrt{3} |
---|
| 80 | |
---|
| 81 | whilst the polydispersity is |
---|
| 82 | |
---|
| 83 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 84 | |
---|
| 85 | .. figure:: pd_rectangular.jpg |
---|
| 86 | |
---|
| 87 | Rectangular distribution. |
---|
| 88 | |
---|
[75e4319] | 89 | Uniform Distribution |
---|
| 90 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 91 | |
---|
| 92 | The 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 | |
---|
| 116 | Gaussian Distribution |
---|
| 117 | ^^^^^^^^^^^^^^^^^^^^^ |
---|
| 118 | |
---|
| 119 | The 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] | 126 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 127 | factor which is determined during the numerical calculation. |
---|
[990d8df] | 128 | |
---|
| 129 | The polydispersity is |
---|
| 130 | |
---|
| 131 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 132 | |
---|
| 133 | .. figure:: pd_gaussian.jpg |
---|
| 134 | |
---|
| 135 | Normal distribution. |
---|
| 136 | |
---|
| 137 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 138 | |
---|
| 139 | Lognormal Distribution |
---|
| 140 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 141 | |
---|
| 142 | The 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 | |
---|
| 149 | where $\mu=\ln(x_\text{med})$ when $x_\text{med}$ is the median value of the |
---|
| 150 | distribution, and *Norm* is a normalization factor which will be determined |
---|
| 151 | during the numerical calculation. |
---|
| 152 | |
---|
[1f058ea] | 153 | The median value for the distribution will be the value given for the |
---|
| 154 | respective size parameter, for example, *radius=60*. |
---|
[990d8df] | 155 | |
---|
| 156 | The polydispersity is given by $\sigma$ |
---|
| 157 | |
---|
| 158 | .. math:: \text{PD} = p |
---|
| 159 | |
---|
| 160 | For the angular distribution |
---|
| 161 | |
---|
| 162 | .. math:: p = \sigma / x_\text{med} |
---|
| 163 | |
---|
| 164 | The mean value is given by $\bar x = \exp(\mu+ p^2/2)$. The peak value |
---|
| 165 | is given by $\max x = \exp(\mu - p^2)$. |
---|
| 166 | |
---|
| 167 | .. figure:: pd_lognormal.jpg |
---|
| 168 | |
---|
| 169 | Lognormal distribution. |
---|
| 170 | |
---|
| 171 | This 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 |
---|
| 173 | in the distribution. |
---|
| 174 | |
---|
| 175 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 176 | |
---|
| 177 | Schulz Distribution |
---|
| 178 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 179 | |
---|
| 180 | The 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 | |
---|
| 187 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 188 | factor which is determined during the numerical calculation, and $z$ is a |
---|
| 189 | measure of the width of the distribution such that |
---|
| 190 | |
---|
| 191 | .. math:: z = (1-p^2) / p^2 |
---|
| 192 | |
---|
| 193 | The polydispersity is |
---|
| 194 | |
---|
| 195 | .. math:: p = \sigma / \bar x |
---|
| 196 | |
---|
| 197 | Note that larger values of PD might need larger number of points and $N_\sigma$. |
---|
| 198 | For 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 | |
---|
| 204 | For further information on the Schulz distribution see: |
---|
| 205 | M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461. |
---|
| 206 | |
---|
| 207 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 208 | |
---|
| 209 | Array Distribution |
---|
| 210 | ^^^^^^^^^^^^^^^^^^ |
---|
| 211 | |
---|
[a5a12ca] | 212 | This user-definable distribution should be given as a simple ASCII text |
---|
[990d8df] | 213 | file where the array is defined by two columns of numbers: $x$ and $f(x)$. |
---|
| 214 | The $f(x)$ will be normalized to 1 during the computation. |
---|
| 215 | |
---|
| 216 | Example 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 | |
---|
| 228 | Only these array values are used computation, therefore the parameter value |
---|
| 229 | given for the model will have no affect, and will be ignored when computing |
---|
| 230 | the average. This means that any parameter with an array distribution will |
---|
[a5a12ca] | 231 | not be fitable. |
---|
| 232 | |
---|
| 233 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 234 | |
---|
| 235 | Boltzmann Distribution |
---|
| 236 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 237 | |
---|
| 238 | The 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 | |
---|
| 245 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 246 | factor which is determined during the numerical calculation. |
---|
| 247 | The width is defined as |
---|
| 248 | |
---|
| 249 | .. math:: \sigma=\frac{k T}{E} |
---|
| 250 | |
---|
| 251 | which is the inverse Boltzmann factor, |
---|
| 252 | where $k$ is the Boltzmann constant, $T$ the temperature in Kelvin and $E$ a |
---|
| 253 | characteristic energy per particle. |
---|
| 254 | |
---|
| 255 | .. figure:: pd_boltzmann.jpg |
---|
| 256 | |
---|
| 257 | Boltzmann distribution. |
---|
[990d8df] | 258 | |
---|
| 259 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 260 | |
---|
| 261 | Note about DLS polydispersity |
---|
| 262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 263 | |
---|
| 264 | Many commercial Dynamic Light Scattering (DLS) instruments produce a size |
---|
[1f058ea] | 265 | polydispersity parameter, sometimes even given the symbol $p$\ ! This |
---|
[990d8df] | 266 | parameter is defined as the relative standard deviation coefficient of |
---|
| 267 | variation of the size distribution and is NOT the same as the polydispersity |
---|
| 268 | parameters in the Lognormal and Schulz distributions above (though they all |
---|
| 269 | related) except when the DLS polydispersity parameter is <0.13. |
---|
| 270 | |
---|
| 271 | For more information see: |
---|
| 272 | S 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 |
---|