source: sasmodels/sasmodels/models/cylinder_clone.py @ 19dcb933

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 19dcb933 was 19dcb933, checked in by Paul Kienzle <pkienzle@…>, 10 years ago

build docs for models

  • Property mode set to 100644
File size: 1.5 KB
Line 
1
2from numpy import pi, inf
3
4name = "CylinderModel"
5title = "Cylinder with uniform scattering length density"
6description = """\
7         f(q)= 2*(sldCyl - sldSolv)*V*sin(qLcos(alpha/2))
8                /[qLcos(alpha/2)]*J1(qRsin(alpha/2))/[qRsin(alpha)]
9
10                P(q,alpha)= scale/V*f(q)^(2)+background
11                V: Volume of the cylinder
12                R: Radius of the cylinder
13                L: Length of the cylinder
14                J1: The bessel function
15                alpha: angle betweenthe axis of the
16                cylinder and the q-vector for 1D
17                :the ouput is P(q)=scale/V*integral
18                from pi/2 to zero of...
19                f(q)^(2)*sin(alpha)*dalpha+ bkg
20"""
21
22parameters = [
23    #   [ "name", "units", default, [lower, upper], "type",
24    #     "description" ],
25    [ "sldCyl", "1/Ang^2", 4e-6, [-inf,inf], "",
26      "Cylinder scattering length density" ],
27    [ "sldSolv", "1/Ang^2", 1e-6, [-inf,inf], "",
28      "Solvent scattering length density" ],
29    [ "radius", "Ang",  20, [0, inf], "volume",
30      "Cylinder radius" ],
31    [ "length", "Ang",  400, [0, inf], "volume",
32      "Cylinder length" ],
33    [ "cyl_theta", "degrees", 60, [-inf, inf], "orientation",
34      "In plane angle" ],
35    [ "cyl_phi", "degrees", 60, [-inf, inf], "orientation",
36      "Out of plane angle" ],
37    ]
38source = [ "lib/J1.c", "lib/gauss76.c", "cylinder_clone.c" ]
39
40def ER(radius, length):
41    ddd = 0.75*radius*(2*radius*length + (length+radius)*(length+pi*radius))
42    return 0.5 * (ddd)**(1./3.)
43
Note: See TracBrowser for help on using the repository browser.