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