[8007311] | 1 | r""" |
---|
| 2 | |
---|
| 3 | Definition |
---|
| 4 | ---------- |
---|
| 5 | This model provides the form factor for a circular cylinder with a core-shell |
---|
[2f0c07d] | 6 | scattering length density profile. The form factor is normalized by the |
---|
| 7 | particle volume. |
---|
[8007311] | 8 | |
---|
[fa8011eb] | 9 | .. _core-shell-bicelle-geometry: |
---|
[8007311] | 10 | |
---|
| 11 | .. figure:: img/core_shell_bicelle_geometry.png |
---|
| 12 | |
---|
| 13 | (Graphic from DOI: 10.1039/C0NP00002G) |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | The output of the 1D scattering intensity function for randomly oriented |
---|
| 17 | cylinders is then given by the equation above. |
---|
| 18 | |
---|
| 19 | The *theta* and *phi* parameters are not used for the 1D output. |
---|
| 20 | Our implementation of the scattering kernel and the 1D scattering intensity |
---|
| 21 | use the c-library from NIST. |
---|
| 22 | |
---|
[2f0c07d] | 23 | .. figure:: img/cylinder_angle_definition.jpg |
---|
[8007311] | 24 | |
---|
[2f0c07d] | 25 | Definition of the angles for the oriented core shell bicelle tmodel. |
---|
[8007311] | 26 | |
---|
[2f0c07d] | 27 | .. figure:: img/cylinder_angle_projection.jpg |
---|
[8007311] | 28 | |
---|
| 29 | Examples of the angles for oriented pp against the detector plane. |
---|
| 30 | |
---|
| 31 | References |
---|
| 32 | ---------- |
---|
| 33 | |
---|
| 34 | L A Feigin and D I Svergun, |
---|
| 35 | *Structure Analysis by Small-Angle X-Ray and Neutron Scattering,* |
---|
| 36 | Plenum Press, New York, (1987) |
---|
| 37 | |
---|
| 38 | """ |
---|
| 39 | |
---|
| 40 | from numpy import inf, sin, cos |
---|
| 41 | |
---|
| 42 | name = "core_shell_bicelle" |
---|
| 43 | title = "Circular cylinder with a core-shell scattering length density profile.." |
---|
| 44 | description = """ |
---|
| 45 | P(q,alpha)= scale/Vs*f(q)^(2) + bkg, where: f(q)= 2(core_sld |
---|
| 46 | - solvant_sld)* Vc*sin[qLcos(alpha/2)] |
---|
| 47 | /[qLcos(alpha/2)]*J1(qRsin(alpha)) |
---|
| 48 | /[qRsin(alpha)]+2(shell_sld-solvent_sld) |
---|
| 49 | *Vs*sin[q(L+T)cos(alpha/2)][[q(L+T) |
---|
| 50 | *cos(alpha/2)]*J1(q(R+T)sin(alpha)) |
---|
| 51 | /q(R+T)sin(alpha)] |
---|
| 52 | |
---|
| 53 | alpha:is the angle between the axis of |
---|
| 54 | the cylinder and the q-vector |
---|
| 55 | Vs: the volume of the outer shell |
---|
| 56 | Vc: the volume of the core |
---|
| 57 | L: the length of the core |
---|
| 58 | shell_sld: the scattering length density |
---|
| 59 | of the shell |
---|
| 60 | solvent_sld: the scattering length density |
---|
| 61 | of the solvent |
---|
| 62 | bkg: the background |
---|
| 63 | T: the thickness |
---|
| 64 | R+T: is the outer radius |
---|
| 65 | L+2T: The total length of the outershell |
---|
| 66 | J1: the first order Bessel function |
---|
| 67 | theta: axis_theta of the cylinder |
---|
| 68 | phi: the axis_phi of the cylinder... |
---|
| 69 | """ |
---|
| 70 | category = "shape:cylinder" |
---|
| 71 | |
---|
| 72 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 73 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
| 74 | parameters = [ |
---|
| 75 | ["radius", "Ang", 20, [0, inf], "volume", "Cylinder core radius"], |
---|
| 76 | ["rim_thickness", "Ang", 10, [0, inf], "volume", "Rim shell thickness"], |
---|
| 77 | ["face_thickness", "Ang", 10, [0, inf], "volume", "Cylinder face thickness"], |
---|
| 78 | ["length", "Ang", 400, [0, inf], "volume", "Cylinder length"], |
---|
| 79 | ["core_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Cylinder core scattering length density"], |
---|
| 80 | ["face_sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Cylinder face scattering length density"], |
---|
| 81 | ["rim_sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Cylinder rim scattering length density"], |
---|
| 82 | ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], |
---|
| 83 | ["theta", "degrees", 90, [-inf, inf], "orientation", "In plane angle"], |
---|
| 84 | ["phi", "degrees", 0, [-inf, inf], "orientation", "Out of plane angle"], |
---|
| 85 | ] |
---|
| 86 | |
---|
| 87 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 88 | |
---|
[e7678b2] | 89 | source = ["lib/Si.c", "lib/J1.c", "lib/J1c.c", "lib/gauss76.c", "core_shell_bicelle.c"] |
---|
[8007311] | 90 | |
---|
| 91 | demo = dict(scale=1, background=0, |
---|
| 92 | radius=20.0, |
---|
| 93 | rim_thickness=10.0, |
---|
| 94 | face_thickness=10.0, |
---|
| 95 | length=400.0, |
---|
| 96 | core_sld=1.0, |
---|
| 97 | face_sld=4.0, |
---|
| 98 | rim_sld=4.0, |
---|
| 99 | solvent_sld=1.0, |
---|
| 100 | theta=90, |
---|
| 101 | phi=0) |
---|
| 102 | |
---|
| 103 | oldname = 'CoreShellBicelleModel' |
---|
| 104 | |
---|
| 105 | oldpars = dict(rim_thickness='rim_thick', |
---|
| 106 | face_thickness='face_thick', |
---|
| 107 | theta='axis_theta', |
---|
| 108 | phi='axis_phi') |
---|
| 109 | |
---|
| 110 | qx, qy = 0.4 * cos(90), 0.5 * sin(0) |
---|
| 111 | tests = [ |
---|
| 112 | # Accuracy tests based on content in test/utest_other_models.py |
---|
| 113 | [{'radius': 20.0, |
---|
| 114 | 'rim_thickness': 10.0, |
---|
| 115 | 'face_thickness': 10.0, |
---|
| 116 | 'length': 400.0, |
---|
| 117 | 'core_sld': 1.0, |
---|
| 118 | 'face_sld': 4.0, |
---|
| 119 | 'rim_sld': 4.0, |
---|
| 120 | 'solvent_sld': 1.0, |
---|
| 121 | 'background': 0.0, |
---|
| 122 | }, 0.001, 353.550], |
---|
| 123 | |
---|
| 124 | [{'radius': 20.0, |
---|
| 125 | 'rim_thickness': 10.0, |
---|
| 126 | 'face_thickness': 10.0, |
---|
| 127 | 'length': 400.0, |
---|
| 128 | 'core_sld': 1.0, |
---|
| 129 | 'face_sld': 4.0, |
---|
| 130 | 'rim_sld': 4.0, |
---|
| 131 | 'solvent_sld': 1.0, |
---|
| 132 | 'theta': 90.0, |
---|
| 133 | 'phi': 0.0, |
---|
| 134 | 'background': 0.00, |
---|
| 135 | }, (qx, qy), 24.9167], |
---|
| 136 | |
---|
| 137 | # Additional tests with larger range of parameters |
---|
| 138 | [{'radius': 3.0, |
---|
| 139 | 'rim_thickness': 100.0, |
---|
| 140 | 'face_thickness': 100.0, |
---|
| 141 | 'length': 1200.0, |
---|
| 142 | 'core_sld': 5.0, |
---|
| 143 | 'face_sld': 41.0, |
---|
| 144 | 'rim_sld': 42.0, |
---|
| 145 | 'solvent_sld': 21.0, |
---|
| 146 | }, 0.05, 1670.1828], |
---|
| 147 | ] |
---|