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