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