Changeset 68532f3 in sasmodels for _sources/model/core_shell_cylinder.txt


Ignore:
Timestamp:
Nov 1, 2015 2:10:22 PM (8 years ago)
Author:
ajj
Branches:
gh-pages
Children:
4a9a316
Parents:
d1fe925
Message:

Adding docs

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 
     3Core shell cylinder 
     4======================================================= 
     5 
     6Right circular cylinder with a core-shell scattering length density profile. 
     7 
     8=========== ======================================== ============ ============= 
     9Parameter   Description                              Units        Default value 
     10=========== ======================================== ============ ============= 
     11scale       Source intensity                         None                     1 
     12background  Source background                        |cm^-1|                  0 
     13core_sld    Cylinder core scattering length density  |1e-6Ang^-2|             4 
     14shell_sld   Cylinder shell scattering length density |1e-6Ang^-2|             4 
     15solvent_sld Solvent scattering length density        |1e-6Ang^-2|             1 
     16radius      Cylinder core radius                     |Ang|                   20 
     17thickness   Cylinder shell thickness                 |Ang|                   20 
     18length      Cylinder length                          |Ang|                  400 
     19theta       In plane angle                           degree                  60 
     20phi         Out of plane angle                       degree                  60 
     21=========== ======================================== ============ ============= 
     22 
     23The returned value is scaled to units of |cm^-1|. 
     24 
     25 
    426The form factor is normalized by the particle volume. 
    527 
     
    102124 
    1031252013/11/26 - Description reviewed by Heenan, R. 
    104 """ 
    105126 
    106 from numpy import pi, inf 
    107  
    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 of 
    121         the cylinder and the q-vector 
    122     Vs: the volume of the outer shell 
    123     Vc: the volume of the core 
    124     L: the length of the core 
    125         shell_sld: the scattering length density of the shell 
    126     solvent_sld: the scattering length density of the solvent 
    127     background: the background 
    128     T: the thickness 
    129         R+T: is the outer radius 
    130      L+2T: The total length of the outershell 
    131     J1: the first order Bessel function 
    132      theta: axis_theta of the cylinder 
    133      phi: the axis_phi of the cylinder 
    134 """ 
    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 + thickness 
    160     length = length + 2 * thickness 
    161     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 * length 
    167     return whole, whole - core 
    168  
    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.