[321736f] | 1 | r""" |
---|
| 2 | Definition |
---|
| 3 | ---------- |
---|
| 4 | |
---|
| 5 | The 1D scattering intensity is calculated in the following way (Guinier, 1955) |
---|
| 6 | |
---|
| 7 | .. math:: |
---|
| 8 | |
---|
[062db5a] | 9 | P(q) = \frac{\phi}{V_\text{shell}} \left[ |
---|
[321736f] | 10 | \frac{3V_{\text{core}}({\rho_{\text{solvent}} |
---|
| 11 | - \rho_{\text{shell}})j_1(qR_{\text{core}})}}{qR_{\text{core}}} |
---|
| 12 | + \frac{3V_{\text{tot}}(\rho_{\text{shell}} |
---|
| 13 | - \rho_{\text{solvent}}) j_1(qR_{\text{tot}})}{qR_{\text{tot}}} |
---|
| 14 | \right]^2 + \text{background} |
---|
| 15 | |
---|
| 16 | |
---|
[062db5a] | 17 | where $\phi$ is the volume fraction of shell material, $V_{shell}$ is the volume |
---|
| 18 | of the shell, $V_{\text{cor}}$ is the volume of the core, $V_{\text{tot}}$ is |
---|
| 19 | the total volume, $R_{\text{core}}$ is the radius of the core, $R_{\text{tot}}$ |
---|
| 20 | is the outer radius of the shell, $\rho_{\text{solvent}}$ is the scattering |
---|
| 21 | length density of the solvent (which is the same as for the core in this case), |
---|
[321736f] | 22 | $\rho_{\text{scale}}$ is the scattering length density of the shell, background |
---|
| 23 | is a flat background level (due for example to incoherent scattering in the |
---|
| 24 | case of neutrons), and $j_1$ is the spherical bessel function |
---|
[fa8011eb] | 25 | $j_1 = (\sin(x) - x \cos(x))/ x^2$. |
---|
[321736f] | 26 | |
---|
| 27 | The functional form is identical to a "typical" core-shell structure, except |
---|
| 28 | that the scattering is normalized by the volume that is contributing to the |
---|
| 29 | scattering, namely the volume of the shell alone, the scattering length density |
---|
| 30 | of the core is fixed the same as that of the solvent, the scale factor when the |
---|
| 31 | data are on an absolute scale is equivalent to the volume fraction of material |
---|
| 32 | in the shell rather than the entire core+shell sphere, and the parameterization |
---|
| 33 | is done in terms of the core radius = $R_{\text{core}}$ and the shell |
---|
| 34 | thickness = $R_{\text{tot}} - R_{\text{core}}$. |
---|
| 35 | |
---|
[fa8011eb] | 36 | .. figure:: img/vesicle_geometry.jpg |
---|
| 37 | |
---|
| 38 | Vesicle geometry. |
---|
[321736f] | 39 | |
---|
| 40 | The 2D scattering intensity is the same as *P(q)* above, regardless of the |
---|
| 41 | orientation of the *q* vector which is defined as |
---|
| 42 | |
---|
| 43 | .. math:: |
---|
| 44 | |
---|
| 45 | q = \sqrt{q_x^2 + q_y^2} |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | NB: The outer most radius (= *radius* + *thickness*) is used as the effective |
---|
| 49 | radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied. |
---|
| 50 | |
---|
| 51 | |
---|
[aa2edb2] | 52 | References |
---|
| 53 | ---------- |
---|
[321736f] | 54 | |
---|
| 55 | A Guinier and G. Fournet, *Small-Angle Scattering of X-Rays*, John Wiley and |
---|
| 56 | Sons, New York, (1955) |
---|
[062db5a] | 57 | |
---|
| 58 | **Author:** NIST IGOR/DANSE **on:** pre 2010 |
---|
| 59 | |
---|
| 60 | **Last Modified by:** Paul Butler **on:** March 20, 2016 |
---|
| 61 | |
---|
| 62 | **Last Reviewed by:** Paul Butler **on:** March 20, 2016 |
---|
[321736f] | 63 | """ |
---|
| 64 | |
---|
| 65 | from numpy import pi, inf |
---|
| 66 | |
---|
| 67 | name = "vesicle" |
---|
| 68 | title = "This model provides the form factor, *P(q)*, for an unilamellar \ |
---|
| 69 | vesicle. This is model is effectively identical to the hollow sphere \ |
---|
[216fa6d] | 70 | reparameterized to be more intuitive for a vesicle and normalizing the \ |
---|
| 71 | form factor by the volume of the shell." |
---|
[321736f] | 72 | description = """ |
---|
| 73 | Model parameters: |
---|
| 74 | radius : the core radius of the vesicle |
---|
| 75 | thickness: the shell thickness |
---|
| 76 | sld: the shell SLD |
---|
[062db5a] | 77 | sld_slovent: the solvent (and core) SLD |
---|
[321736f] | 78 | background: incoherent background |
---|
[062db5a] | 79 | volfraction: shell volume fraction |
---|
| 80 | scale : scale factor = 1 if on absolute scale""" |
---|
[321736f] | 81 | category = "shape:sphere" |
---|
| 82 | |
---|
| 83 | # [ "name", "units", default, [lower, upper], "type", "description"], |
---|
[42356c8] | 84 | parameters = [["sld", "1e-6/Ang^2", 0.5, [-inf, inf], "sld", |
---|
[321736f] | 85 | "vesicle shell scattering length density"], |
---|
[42356c8] | 86 | ["sld_solvent", "1e-6/Ang^2", 6.36, [-inf, inf], "sld", |
---|
[321736f] | 87 | "solvent scattering length density"], |
---|
[062db5a] | 88 | ["volfraction", "", 0.05, [0, 1.0], "", |
---|
| 89 | "volume fraction of shell"], |
---|
[321736f] | 90 | ["radius", "Ang", 100, [0, inf], "volume", |
---|
| 91 | "vesicle core radius"], |
---|
| 92 | ["thickness", "Ang", 30, [0, inf], "volume", |
---|
| 93 | "vesicle shell thickness"], |
---|
| 94 | ] |
---|
| 95 | |
---|
| 96 | source = ["lib/sph_j1c.c", "vesicle.c"] |
---|
| 97 | |
---|
| 98 | def ER(radius, thickness): |
---|
| 99 | ''' |
---|
| 100 | returns the effective radius used in the S*P calculation |
---|
| 101 | |
---|
| 102 | :param radius: core radius |
---|
| 103 | :param thickness: shell thickness |
---|
| 104 | ''' |
---|
| 105 | return radius + thickness |
---|
| 106 | |
---|
| 107 | def VR(radius, thickness): |
---|
| 108 | ''' |
---|
| 109 | returns the volumes of the shell and of the whole sphere including the |
---|
| 110 | core plus shell - is used to normalize when including polydispersity. |
---|
| 111 | |
---|
| 112 | :param radius: core radius |
---|
| 113 | :param thickness: shell thickness |
---|
| 114 | :return whole: volume of core and shell |
---|
| 115 | :return whole-core: volume of the shell |
---|
| 116 | ''' |
---|
| 117 | |
---|
| 118 | whole = 4. * pi * (radius + thickness) ** 3. / 3. |
---|
| 119 | core = 4. * pi * radius ** 3. / 3. |
---|
| 120 | return whole, whole - core |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | # parameters for demo |
---|
[062db5a] | 124 | demo = dict(sld=0.5, sld_solvent=6.36, |
---|
| 125 | volfraction=0.05, |
---|
[321736f] | 126 | radius=100, thickness=30, |
---|
| 127 | radius_pd=.2, radius_pd_n=10, |
---|
| 128 | thickness_pd=.2, thickness_pd_n=10) |
---|
| 129 | |
---|
[6dd90c1] | 130 | # NOTE: test results taken from values returned by SasView 3.1.2, with |
---|
| 131 | # 0.001 added for a non-zero default background. |
---|
[062db5a] | 132 | tests = [[{}, 0.0005, 859.916526646], |
---|
| 133 | [{}, 0.100600200401, 1.77063682331], |
---|
| 134 | [{}, 0.5, 0.00355351388906], |
---|
[321736f] | 135 | [{}, 'ER', 130.], |
---|
| 136 | [{}, 'VR', 0.54483386436], |
---|
| 137 | ] |
---|