[edc9f8d] | 1 | r""" |
---|
[55b2b232] | 2 | .. _core_shell_sphere: |
---|
| 3 | |
---|
[edc9f8d] | 4 | This model provides the form factor, $P(q)$, for a spherical particle with a core-shell structure. |
---|
| 5 | The form factor is normalized by the particle volume. |
---|
| 6 | |
---|
| 7 | Definition |
---|
| 8 | ---------- |
---|
| 9 | |
---|
| 10 | The 1D scattering intensity is calculated in the following way (Guinier, 1955) |
---|
| 11 | |
---|
| 12 | .. math:: |
---|
| 13 | |
---|
| 14 | P(q) = \frac{\text{scale}}{V} F^2(q) + \text{background} |
---|
| 15 | |
---|
| 16 | where |
---|
| 17 | |
---|
| 18 | .. math:: |
---|
[fa8011eb] | 19 | |
---|
[edc9f8d] | 20 | F^2(q)=\frac{3}{V_s}\left[V_c(\rho_c-\rho_s)\frac{\sin(qr_c)-qr_c\cos(qr_c)}{(qr_c)^3}+ |
---|
| 21 | V_s(\rho_s-\rho_{solv})\frac{\sin(qr_s)-qr_s\cos(qr_s)}{(qr_s)^3}\right] |
---|
[8c9dbc9] | 22 | |
---|
[3556ad7] | 23 | where $V_s$ is the volume of the whole particle, $V_c$ is |
---|
| 24 | the volume of the core, $r_s$ = $radius$ + $thickness$ is the radius of the particle, $r_c$ is the radius of the |
---|
[edc9f8d] | 25 | core, $\rho_c$ is the scattering length density of the core, $\rho_s$ is the scattering length |
---|
| 26 | density of the shell, $\rho_{solv}$ is the scattering length density of the solvent. |
---|
| 27 | |
---|
| 28 | The 2D scattering intensity is the same as $P(q)$ above, regardless of the |
---|
| 29 | orientation of the $q$ vector. |
---|
| 30 | |
---|
| 31 | NB: The outer most radius (ie, = radius + thickness) is used as the |
---|
| 32 | effective radius for $S(Q)$ when $P(Q) \cdot S(Q)$ is applied. |
---|
| 33 | |
---|
[3556ad7] | 34 | References |
---|
| 35 | ---------- |
---|
[edc9f8d] | 36 | |
---|
| 37 | A Guinier and G Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and Sons, New York, (1955) |
---|
| 38 | |
---|
| 39 | Validation |
---|
| 40 | ---------- |
---|
| 41 | |
---|
| 42 | Validation of our code was done by comparing the output of the 1D model to the output of |
---|
| 43 | the software provided by NIST (Kline, 2006). Figure 1 shows a comparison of the output of |
---|
| 44 | our model and the output of the NIST software. |
---|
| 45 | |
---|
| 46 | """ |
---|
| 47 | |
---|
| 48 | from numpy import pi, inf |
---|
| 49 | |
---|
| 50 | name = "core_shell_sphere" |
---|
| 51 | title = "Form factor for a monodisperse spherical particle with particle with a core-shell structure." |
---|
| 52 | description = """ |
---|
[3556ad7] | 53 | F^2(q) = 3/V_s [V_c (sld_core-sld_shell) (sin(q*radius)-q*radius*cos(q*radius))/(q*radius)^3 |
---|
| 54 | + V_s (sld_shell-sld_solvent) (sin(q*r_s)-q*r_s*cos(q*r_s))/(q*r_s)^3] |
---|
[edc9f8d] | 55 | |
---|
| 56 | V_s: Volume of the sphere shell |
---|
| 57 | V_c: Volume of the sphere core |
---|
| 58 | r_s: Shell radius = radius + thickness |
---|
| 59 | """ |
---|
| 60 | category = "shape:sphere" |
---|
| 61 | |
---|
| 62 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 63 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 64 | parameters = [["radius", "Ang", 60.0, [0, inf], "volume", "Sphere core radius"], |
---|
| 65 | ["thickness", "Ang", 10.0, [0, inf], "volume", "Sphere shell thickness"], |
---|
[42356c8] | 66 | ["sld_core", "1e-6/Ang^2", 1.0, [-inf, inf], "sld", "core scattering length density"], |
---|
| 67 | ["sld_shell", "1e-6/Ang^2", 2.0, [-inf, inf], "sld", "shell scattering length density"], |
---|
| 68 | ["sld_solvent", "1e-6/Ang^2", 3.0, [-inf, inf], "sld", "Solvent scattering length density"]] |
---|
[edc9f8d] | 69 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 70 | |
---|
[7d4b2ae] | 71 | source = ["lib/sph_j1c.c", "lib/core_shell.c", "core_shell_sphere.c"] |
---|
[edc9f8d] | 72 | |
---|
| 73 | demo = dict(scale=1, background=0, radius=60, thickness=10, |
---|
[3556ad7] | 74 | sld_core=1.0, sld_shell=2.0, sld_solvent=0.0) |
---|
[edc9f8d] | 75 | |
---|
| 76 | def ER(radius, thickness): |
---|
| 77 | """ |
---|
| 78 | Equivalent radius |
---|
| 79 | @param radius: core radius |
---|
| 80 | @param thickness: shell thickness |
---|
| 81 | """ |
---|
| 82 | return radius + thickness |
---|
| 83 | |
---|
| 84 | def VR(radius, thickness): |
---|
| 85 | """ |
---|
| 86 | Volume ratio |
---|
| 87 | @param radius: core radius |
---|
| 88 | @param thickness: shell thickness |
---|
| 89 | """ |
---|
[3f167d9] | 90 | return (1,1) |
---|
[edc9f8d] | 91 | whole = 4.0 * pi / 3.0 * pow((radius + thickness), 3) |
---|
| 92 | core = 4.0 * pi / 3.0 * radius * radius * radius |
---|
| 93 | return whole, whole - core |
---|
| 94 | |
---|
[8c9dbc9] | 95 | tests = [[{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], |
---|
[3c6d5bc] | 96 | # TODO: VR test suppressed until we sort out new product model |
---|
| 97 | # and determine what to do with volume ratio. |
---|
| 98 | #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], |
---|
[edc9f8d] | 99 | |
---|
| 100 | # The SasView test result was 0.00169, with a background of 0.001 |
---|
| 101 | [{'radius': 60.0, |
---|
| 102 | 'thickness': 10.0, |
---|
[3556ad7] | 103 | 'sld_core': 1.0, |
---|
| 104 | 'sld_shell':2.0, |
---|
| 105 | 'sld_solvent':3.0, |
---|
[edc9f8d] | 106 | 'background':0.0 |
---|
[8c9dbc9] | 107 | }, 0.4, 0.000698838]] |
---|