[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 | |
---|
[22279a4] | 44 | The 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 | |
---|
| 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 |
---|
[92d330fd] | 73 | calculation. |
---|
[990d8df] | 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. |
---|
[92d330fd] | 88 | |
---|
[3d58247] | 89 | |
---|
[990d8df] | 90 | |
---|
[75e4319] | 91 | Uniform Distribution |
---|
| 92 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 93 | |
---|
| 94 | The 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 | |
---|
| 116 | The value $N_\sigma$ is ignored for this distribution. |
---|
[75e4319] | 117 | |
---|
[990d8df] | 118 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 119 | |
---|
| 120 | Gaussian Distribution |
---|
| 121 | ^^^^^^^^^^^^^^^^^^^^^ |
---|
| 122 | |
---|
| 123 | The 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] | 130 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 131 | factor which is determined during the numerical calculation. |
---|
[990d8df] | 132 | |
---|
| 133 | The polydispersity is |
---|
| 134 | |
---|
| 135 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 136 | |
---|
| 137 | .. figure:: pd_gaussian.jpg |
---|
| 138 | |
---|
| 139 | Normal distribution. |
---|
| 140 | |
---|
| 141 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 142 | |
---|
| 143 | Lognormal Distribution |
---|
| 144 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 145 | |
---|
| 146 | The 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 | |
---|
| 153 | where $\mu=\ln(x_\text{med})$ when $x_\text{med}$ is the median value of the |
---|
| 154 | distribution, and *Norm* is a normalization factor which will be determined |
---|
| 155 | during the numerical calculation. |
---|
| 156 | |
---|
[1f058ea] | 157 | The median value for the distribution will be the value given for the |
---|
| 158 | respective size parameter, for example, *radius=60*. |
---|
[990d8df] | 159 | |
---|
| 160 | The polydispersity is given by $\sigma$ |
---|
| 161 | |
---|
| 162 | .. math:: \text{PD} = p |
---|
| 163 | |
---|
| 164 | For the angular distribution |
---|
| 165 | |
---|
| 166 | .. math:: p = \sigma / x_\text{med} |
---|
| 167 | |
---|
| 168 | The mean value is given by $\bar x = \exp(\mu+ p^2/2)$. The peak value |
---|
| 169 | is given by $\max x = \exp(\mu - p^2)$. |
---|
| 170 | |
---|
| 171 | .. figure:: pd_lognormal.jpg |
---|
| 172 | |
---|
| 173 | Lognormal distribution. |
---|
| 174 | |
---|
| 175 | This 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 |
---|
| 177 | in the distribution. |
---|
| 178 | |
---|
| 179 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 180 | |
---|
| 181 | Schulz Distribution |
---|
| 182 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 183 | |
---|
| 184 | The 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 | |
---|
| 191 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 192 | factor which is determined during the numerical calculation, and $z$ is a |
---|
| 193 | measure of the width of the distribution such that |
---|
| 194 | |
---|
| 195 | .. math:: z = (1-p^2) / p^2 |
---|
| 196 | |
---|
| 197 | The polydispersity is |
---|
| 198 | |
---|
| 199 | .. math:: p = \sigma / \bar x |
---|
| 200 | |
---|
| 201 | Note that larger values of PD might need larger number of points and $N_\sigma$. |
---|
[92d330fd] | 202 | For 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 | |
---|
| 208 | For further information on the Schulz distribution see: |
---|
| 209 | M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461. |
---|
| 210 | |
---|
| 211 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 212 | |
---|
| 213 | Array Distribution |
---|
| 214 | ^^^^^^^^^^^^^^^^^^ |
---|
| 215 | |
---|
[a5a12ca] | 216 | This user-definable distribution should be given as a simple ASCII text |
---|
[990d8df] | 217 | file where the array is defined by two columns of numbers: $x$ and $f(x)$. |
---|
| 218 | The $f(x)$ will be normalized to 1 during the computation. |
---|
| 219 | |
---|
| 220 | Example 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 | |
---|
| 232 | Only these array values are used computation, therefore the parameter value |
---|
| 233 | given for the model will have no affect, and will be ignored when computing |
---|
| 234 | the average. This means that any parameter with an array distribution will |
---|
[a5a12ca] | 235 | not be fitable. |
---|
| 236 | |
---|
| 237 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 238 | |
---|
| 239 | Boltzmann Distribution |
---|
| 240 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 241 | |
---|
| 242 | The 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 | |
---|
| 249 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 250 | factor which is determined during the numerical calculation. |
---|
| 251 | The width is defined as |
---|
| 252 | |
---|
| 253 | .. math:: \sigma=\frac{k T}{E} |
---|
| 254 | |
---|
| 255 | which is the inverse Boltzmann factor, |
---|
| 256 | where $k$ is the Boltzmann constant, $T$ the temperature in Kelvin and $E$ a |
---|
| 257 | characteristic energy per particle. |
---|
| 258 | |
---|
| 259 | .. figure:: pd_boltzmann.jpg |
---|
| 260 | |
---|
| 261 | Boltzmann distribution. |
---|
[990d8df] | 262 | |
---|
| 263 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 264 | |
---|
| 265 | Note about DLS polydispersity |
---|
| 266 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 267 | |
---|
| 268 | Many commercial Dynamic Light Scattering (DLS) instruments produce a size |
---|
[1f058ea] | 269 | polydispersity parameter, sometimes even given the symbol $p$\ ! This |
---|
[990d8df] | 270 | parameter is defined as the relative standard deviation coefficient of |
---|
| 271 | variation of the size distribution and is NOT the same as the polydispersity |
---|
| 272 | parameters in the Lognormal and Schulz distributions above (though they all |
---|
| 273 | related) except when the DLS polydispersity parameter is <0.13. |
---|
| 274 | |
---|
| 275 | For more information see: |
---|
| 276 | S 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 |
---|