Changeset 68532f3 in sasmodels for _sources/model/core_shell_cylinder.txt
- Timestamp:
- Nov 1, 2015 2:10:22 PM (8 years ago)
- Branches:
- gh-pages
- Children:
- 4a9a316
- Parents:
- d1fe925
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
_sources/model/core_shell_cylinder.txt
rd1fe925 r68532f3 1 # core shell cylinder model 2 # Note: model title and parameter table are inserted automatically 3 r""" 1 .. _core-shell-cylinder: 2 3 Core shell cylinder 4 ======================================================= 5 6 Right circular cylinder with a core-shell scattering length density profile. 7 8 =========== ======================================== ============ ============= 9 Parameter Description Units Default value 10 =========== ======================================== ============ ============= 11 scale Source intensity None 1 12 background Source background |cm^-1| 0 13 core_sld Cylinder core scattering length density |1e-6Ang^-2| 4 14 shell_sld Cylinder shell scattering length density |1e-6Ang^-2| 4 15 solvent_sld Solvent scattering length density |1e-6Ang^-2| 1 16 radius Cylinder core radius |Ang| 20 17 thickness Cylinder shell thickness |Ang| 20 18 length Cylinder length |Ang| 400 19 theta In plane angle degree 60 20 phi Out of plane angle degree 60 21 =========== ======================================== ============ ============= 22 23 The returned value is scaled to units of |cm^-1|. 24 25 4 26 The form factor is normalized by the particle volume. 5 27 … … 102 124 103 125 2013/11/26 - Description reviewed by Heenan, R. 104 """105 126 106 from numpy import pi, inf107 108 name = "core_shell_cylinder"109 title = "Right circular cylinder with a core-shell scattering length density profile."110 description = """111 P(q,alpha)= scale/Vs*f(q)^(2) + background,112 where: f(q)= 2(core_sld - solvant_sld)113 * Vc*sin[qLcos(alpha/2)]114 /[qLcos(alpha/2)]*J1(qRsin(alpha))115 /[qRsin(alpha)]+2(shell_sld-solvent_sld)116 *Vs*sin[q(L+T)cos(alpha/2)][[q(L+T)117 *cos(alpha/2)]*J1(q(R+T)sin(alpha))118 /q(R+T)sin(alpha)]119 120 alpha:is the angle between the axis of121 the cylinder and the q-vector122 Vs: the volume of the outer shell123 Vc: the volume of the core124 L: the length of the core125 shell_sld: the scattering length density of the shell126 solvent_sld: the scattering length density of the solvent127 background: the background128 T: the thickness129 R+T: is the outer radius130 L+2T: The total length of the outershell131 J1: the first order Bessel function132 theta: axis_theta of the cylinder133 phi: the axis_phi of the cylinder134 """135 category = "shape:cylinder"136 137 # ["name", "units", default, [lower, upper], "type", "description"],138 parameters = [["core_sld", "1e-6/Ang^2", 4, [-inf, inf], "",139 "Cylinder core scattering length density"],140 ["shell_sld", "1e-6/Ang^2", 4, [-inf, inf], "",141 "Cylinder shell scattering length density"],142 ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "",143 "Solvent scattering length density"],144 ["radius", "Ang", 20, [0, inf], "volume",145 "Cylinder core radius"],146 ["thickness", "Ang", 20, [0, inf], "volume",147 "Cylinder shell thickness"],148 ["length", "Ang", 400, [0, inf], "volume",149 "Cylinder length"],150 ["theta", "degrees", 60, [-inf, inf], "orientation",151 "In plane angle"],152 ["phi", "degrees", 60, [-inf, inf], "orientation",153 "Out of plane angle"],154 ]155 156 source = ["lib/J1.c", "lib/gauss76.c", "core_shell_cylinder.c"]157 158 def ER(radius, thickness, length):159 radius = radius + thickness160 length = length + 2 * thickness161 ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius))162 return 0.5 * (ddd) ** (1. / 3.)163 164 def VR(radius, thickness, length):165 whole = pi * (radius + thickness) ** 2 * (length + 2 * thickness)166 core = pi * radius ** 2 * length167 return whole, whole - core168 169 demo = dict(scale=1, background=0,170 core_sld=6, shell_sld=8, solvent_sld=1,171 radius=45, thickness=25, length=340,172 theta=30, phi=15,173 radius_pd=.2, radius_pd_n=1,174 length_pd=.2, length_pd_n=10,175 thickness_pd=.2, thickness_pd_n=10,176 theta_pd=15, theta_pd_n=45,177 phi_pd=15, phi_pd_n=1)178 oldname = 'CoreShellCylinderModel'179 oldpars = dict(theta='axis_theta', phi='axis_phi')
Note: See TracChangeset
for help on using the changeset viewer.