[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 | |
---|
| 8 | Polydispersity Distributions |
---|
| 9 | ---------------------------- |
---|
| 10 | |
---|
| 11 | With some models in sasmodels we can calculate the average form factor for a |
---|
| 12 | population of particles that exhibit size and/or orientational |
---|
| 13 | polydispersity. The resultant form factor is normalized by the average |
---|
| 14 | particle volume such that |
---|
| 15 | |
---|
| 16 | .. math:: |
---|
| 17 | |
---|
| 18 | P(q) = \text{scale} \langle F^* F \rangle / V + \text{background} |
---|
| 19 | |
---|
| 20 | where $F$ is the scattering amplitude and $\langle\cdot\rangle$ denotes an |
---|
| 21 | average over the size distribution. |
---|
| 22 | |
---|
| 23 | Each distribution is characterized by its center $\bar x$, its width $\sigma$, |
---|
| 24 | the number of sigmas $N_\sigma$ to include from the tails, and the number of |
---|
| 25 | points used to compute the average. The center of the distribution is set by the |
---|
| 26 | value of the model parameter. Volume parameters have polydispersity *PD* |
---|
| 27 | (not to be confused with a molecular weight distributions in polymer science) |
---|
| 28 | leading to a size distribution of width $\text{PD} = \sigma / \bar x$, but |
---|
| 29 | orientation parameters use an angular distributions of width $\sigma$. |
---|
| 30 | $N_\sigma$ determines how far into the tails to evaluate the distribution, with |
---|
| 31 | larger values of $N_\sigma$ required for heavier tailed distributions. |
---|
| 32 | The scattering in general falls rapidly with $qr$ so the usual assumption |
---|
| 33 | that $G(r - 3\sigma_r)$ is tiny and therefore $f(r - 3\sigma_r)G(r - 3\sigma_r)$ |
---|
| 34 | will not contribute much to the average may not hold when particles are large. |
---|
| 35 | This, too, will require increasing $N_\sigma$. |
---|
| 36 | |
---|
| 37 | Users should note that the averaging computation is very intensive. Applying |
---|
| 38 | polydispersion to multiple parameters at the same time or increasing the |
---|
| 39 | number of points in the distribution will require patience! However, the |
---|
| 40 | calculations are generally more robust with more data points or more angles. |
---|
| 41 | |
---|
[a5a12ca] | 42 | The following six distribution functions are provided: |
---|
[990d8df] | 43 | |
---|
| 44 | * *Rectangular Distribution* |
---|
[75e4319] | 45 | * *Uniform Distribution* |
---|
[990d8df] | 46 | * *Gaussian Distribution* |
---|
| 47 | * *Lognormal Distribution* |
---|
| 48 | * *Schulz Distribution* |
---|
| 49 | * *Array Distribution* |
---|
[a5a12ca] | 50 | * *Boltzmann Distribution* |
---|
[990d8df] | 51 | |
---|
| 52 | These are all implemented as *number-average* distributions. |
---|
| 53 | |
---|
| 54 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 55 | |
---|
| 56 | Rectangular Distribution |
---|
| 57 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 58 | |
---|
| 59 | The Rectangular Distribution is defined as |
---|
| 60 | |
---|
| 61 | .. math:: |
---|
| 62 | |
---|
| 63 | f(x) = \frac{1}{\text{Norm}} |
---|
| 64 | \begin{cases} |
---|
| 65 | 1 & \text{for } |x - \bar x| \leq w \\ |
---|
| 66 | 0 & \text{for } |x - \bar x| > w |
---|
| 67 | \end{cases} |
---|
| 68 | |
---|
| 69 | where $\bar x$ is the mean of the distribution, $w$ is the half-width, and |
---|
| 70 | *Norm* is a normalization factor which is determined during the numerical |
---|
| 71 | calculation. |
---|
| 72 | |
---|
| 73 | Note that the standard deviation and the half width $w$ are different! |
---|
| 74 | |
---|
| 75 | The standard deviation is |
---|
| 76 | |
---|
| 77 | .. math:: \sigma = w / \sqrt{3} |
---|
| 78 | |
---|
| 79 | whilst the polydispersity is |
---|
| 80 | |
---|
| 81 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 82 | |
---|
| 83 | .. figure:: pd_rectangular.jpg |
---|
| 84 | |
---|
| 85 | Rectangular distribution. |
---|
| 86 | |
---|
[75e4319] | 87 | Uniform Distribution |
---|
| 88 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 89 | |
---|
| 90 | The Uniform Distribution is defined as |
---|
| 91 | |
---|
| 92 | .. math:: |
---|
| 93 | |
---|
| 94 | f(x) = \frac{1}{\text{Norm}} |
---|
| 95 | \begin{cases} |
---|
| 96 | 1 & \text{for } |x - \bar x| \leq \sigma \\ |
---|
| 97 | 0 & \text{for } |x - \bar x| > \sigma |
---|
| 98 | \end{cases} |
---|
| 99 | |
---|
| 100 | where $\bar x$ is the mean of the distribution, $\sigma$ is the half-width, and |
---|
| 101 | *Norm* is a normalization factor which is determined during the numerical |
---|
| 102 | calculation. |
---|
| 103 | |
---|
| 104 | Note that the polydispersity is given by |
---|
| 105 | |
---|
| 106 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 107 | |
---|
| 108 | .. figure:: pd_uniform.jpg |
---|
| 109 | |
---|
| 110 | Uniform distribution. |
---|
| 111 | |
---|
[990d8df] | 112 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 113 | |
---|
| 114 | Gaussian Distribution |
---|
| 115 | ^^^^^^^^^^^^^^^^^^^^^ |
---|
| 116 | |
---|
| 117 | The Gaussian Distribution is defined as |
---|
| 118 | |
---|
| 119 | .. math:: |
---|
| 120 | |
---|
| 121 | f(x) = \frac{1}{\text{Norm}} |
---|
| 122 | \exp\left(-\frac{(x - \bar x)^2}{2\sigma^2}\right) |
---|
| 123 | |
---|
[1f058ea] | 124 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 125 | factor which is determined during the numerical calculation. |
---|
[990d8df] | 126 | |
---|
| 127 | The polydispersity is |
---|
| 128 | |
---|
| 129 | .. math:: \text{PD} = \sigma / \bar x |
---|
| 130 | |
---|
| 131 | .. figure:: pd_gaussian.jpg |
---|
| 132 | |
---|
| 133 | Normal distribution. |
---|
| 134 | |
---|
| 135 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 136 | |
---|
| 137 | Lognormal Distribution |
---|
| 138 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 139 | |
---|
| 140 | The Lognormal Distribution is defined as |
---|
| 141 | |
---|
| 142 | .. math:: |
---|
| 143 | |
---|
| 144 | f(x) = \frac{1}{\text{Norm}} |
---|
| 145 | \frac{1}{xp}\exp\left(-\frac{(\ln(x) - \mu)^2}{2p^2}\right) |
---|
| 146 | |
---|
| 147 | where $\mu=\ln(x_\text{med})$ when $x_\text{med}$ is the median value of the |
---|
| 148 | distribution, and *Norm* is a normalization factor which will be determined |
---|
| 149 | during the numerical calculation. |
---|
| 150 | |
---|
[1f058ea] | 151 | The median value for the distribution will be the value given for the |
---|
| 152 | respective size parameter, for example, *radius=60*. |
---|
[990d8df] | 153 | |
---|
| 154 | The polydispersity is given by $\sigma$ |
---|
| 155 | |
---|
| 156 | .. math:: \text{PD} = p |
---|
| 157 | |
---|
| 158 | For the angular distribution |
---|
| 159 | |
---|
| 160 | .. math:: p = \sigma / x_\text{med} |
---|
| 161 | |
---|
| 162 | The mean value is given by $\bar x = \exp(\mu+ p^2/2)$. The peak value |
---|
| 163 | is given by $\max x = \exp(\mu - p^2)$. |
---|
| 164 | |
---|
| 165 | .. figure:: pd_lognormal.jpg |
---|
| 166 | |
---|
| 167 | Lognormal distribution. |
---|
| 168 | |
---|
| 169 | This distribution function spreads more, and the peak shifts to the left, as |
---|
| 170 | $p$ increases, so it requires higher values of $N_\sigma$ and more points |
---|
| 171 | in the distribution. |
---|
| 172 | |
---|
| 173 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 174 | |
---|
| 175 | Schulz Distribution |
---|
| 176 | ^^^^^^^^^^^^^^^^^^^ |
---|
| 177 | |
---|
| 178 | The Schulz distribution is defined as |
---|
| 179 | |
---|
| 180 | .. math:: |
---|
| 181 | |
---|
| 182 | f(x) = \frac{1}{\text{Norm}} |
---|
| 183 | (z+1)^{z+1}(x/\bar x)^z\frac{\exp[-(z+1)x/\bar x]}{\bar x\Gamma(z+1)} |
---|
| 184 | |
---|
| 185 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 186 | factor which is determined during the numerical calculation, and $z$ is a |
---|
| 187 | measure of the width of the distribution such that |
---|
| 188 | |
---|
| 189 | .. math:: z = (1-p^2) / p^2 |
---|
| 190 | |
---|
| 191 | The polydispersity is |
---|
| 192 | |
---|
| 193 | .. math:: p = \sigma / \bar x |
---|
| 194 | |
---|
| 195 | Note that larger values of PD might need larger number of points and $N_\sigma$. |
---|
| 196 | For example, at PD=0.7 and radius=60 |Ang|, Npts>=160 and Nsigmas>=15 at least. |
---|
| 197 | |
---|
| 198 | .. figure:: pd_schulz.jpg |
---|
| 199 | |
---|
| 200 | Schulz distribution. |
---|
| 201 | |
---|
| 202 | For further information on the Schulz distribution see: |
---|
| 203 | M Kotlarchyk & S-H Chen, *J Chem Phys*, (1983), 79, 2461. |
---|
| 204 | |
---|
| 205 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 206 | |
---|
| 207 | Array Distribution |
---|
| 208 | ^^^^^^^^^^^^^^^^^^ |
---|
| 209 | |
---|
[a5a12ca] | 210 | This user-definable distribution should be given as a simple ASCII text |
---|
[990d8df] | 211 | file where the array is defined by two columns of numbers: $x$ and $f(x)$. |
---|
| 212 | The $f(x)$ will be normalized to 1 during the computation. |
---|
| 213 | |
---|
| 214 | Example of what an array distribution file should look like: |
---|
| 215 | |
---|
| 216 | ==== ===== |
---|
| 217 | 30 0.1 |
---|
| 218 | 32 0.3 |
---|
| 219 | 35 0.4 |
---|
| 220 | 36 0.5 |
---|
| 221 | 37 0.6 |
---|
| 222 | 39 0.7 |
---|
| 223 | 41 0.9 |
---|
| 224 | ==== ===== |
---|
| 225 | |
---|
| 226 | Only these array values are used computation, therefore the parameter value |
---|
| 227 | given for the model will have no affect, and will be ignored when computing |
---|
| 228 | the average. This means that any parameter with an array distribution will |
---|
[a5a12ca] | 229 | not be fitable. |
---|
| 230 | |
---|
| 231 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 232 | |
---|
| 233 | Boltzmann Distribution |
---|
| 234 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 235 | |
---|
| 236 | The Boltzmann Distribution is defined as |
---|
| 237 | |
---|
| 238 | .. math:: |
---|
| 239 | |
---|
| 240 | f(x) = \frac{1}{\text{Norm}} |
---|
| 241 | \exp\left(-\frac{ | x - \bar x | }{\sigma}\right) |
---|
| 242 | |
---|
| 243 | where $\bar x$ is the mean of the distribution and *Norm* is a normalization |
---|
| 244 | factor which is determined during the numerical calculation. |
---|
| 245 | The width is defined as |
---|
| 246 | |
---|
| 247 | .. math:: \sigma=\frac{k T}{E} |
---|
| 248 | |
---|
| 249 | which is the inverse Boltzmann factor, |
---|
| 250 | where $k$ is the Boltzmann constant, $T$ the temperature in Kelvin and $E$ a |
---|
| 251 | characteristic energy per particle. |
---|
| 252 | |
---|
| 253 | .. figure:: pd_boltzmann.jpg |
---|
| 254 | |
---|
| 255 | Boltzmann distribution. |
---|
[990d8df] | 256 | |
---|
| 257 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 258 | |
---|
| 259 | Note about DLS polydispersity |
---|
| 260 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 261 | |
---|
| 262 | Many commercial Dynamic Light Scattering (DLS) instruments produce a size |
---|
[1f058ea] | 263 | polydispersity parameter, sometimes even given the symbol $p$\ ! This |
---|
[990d8df] | 264 | parameter is defined as the relative standard deviation coefficient of |
---|
| 265 | variation of the size distribution and is NOT the same as the polydispersity |
---|
| 266 | parameters in the Lognormal and Schulz distributions above (though they all |
---|
| 267 | related) except when the DLS polydispersity parameter is <0.13. |
---|
| 268 | |
---|
| 269 | For more information see: |
---|
| 270 | S King, C Washington & R Heenan, *Phys Chem Chem Phys*, (2005), 7, 143 |
---|
| 271 | |
---|
| 272 | .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ |
---|
| 273 | |
---|
| 274 | *Document History* |
---|
| 275 | |
---|
| 276 | | 2015-05-01 Steve King |
---|
| 277 | | 2017-05-08 Paul Kienzle |
---|