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


Ignore:
Timestamp:
Nov 1, 2015 4: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/capped_cylinder.txt

    rd1fe925 r68532f3  
    1 r""" 
     1.. _capped-cylinder: 
     2 
     3Capped cylinder 
     4======================================================= 
     5 
     6Right circular cylinder with spherical end caps and uniform SLD 
     7 
     8=========== ================================== ============ ============= 
     9Parameter   Description                        Units        Default value 
     10=========== ================================== ============ ============= 
     11scale       Source intensity                   None                     1 
     12background  Source background                  |cm^-1|                  0 
     13sld         Cylinder scattering length density |1e-6Ang^-2|             4 
     14solvent_sld Solvent scattering length density  |1e-6Ang^-2|             1 
     15radius      Cylinder radius                    |Ang|                   20 
     16cap_radius  Cap radius                         |Ang|                   20 
     17length      Cylinder length                    |Ang|                  400 
     18theta       In plane angle                     degree                  60 
     19phi         Out of plane angle                 degree                  60 
     20=========== ================================== ============ ============= 
     21 
     22The returned value is scaled to units of |cm^-1|. 
     23 
     24 
    225Calculates the scattering from a cylinder with spherical section end-caps. 
    326This model simply becomes the a convex lens when the length of the cylinder 
     
    109132 
    110133H Kaya and N-R deSouza, *J. Appl. Cryst.*, 37 (2004) 508-509 (addenda and errata) 
    111 """ 
    112 from numpy import inf 
    113134 
    114 name = "capped_cylinder" 
    115 title = "Right circular cylinder with spherical end caps and uniform SLD" 
    116 description = """That is, a sphereocylinder 
    117     with end caps that have a radius larger than 
    118     that of the cylinder and the center of the 
    119     end cap radius lies within the cylinder. 
    120     Note: As the length of cylinder -->0, 
    121     it becomes a ConvexLens. 
    122     It must be that radius <(=) cap_radius. 
    123     [Parameters]; 
    124     scale: volume fraction of spheres, 
    125     background:incoherent background, 
    126     radius: radius of the cylinder, 
    127     length: length of the cylinder, 
    128     cap_radius: radius of the semi-spherical cap, 
    129     sld: SLD of the capped cylinder, 
    130     solvent_sld: SLD of the solvent. 
    131 """ 
    132 category = "shape:cylinder" 
    133  
    134 #             ["name", "units", default, [lower, upper], "type", "description"], 
    135 parameters = [["sld", "1e-6/Ang^2", 4, [-inf, inf], "", 
    136                "Cylinder scattering length density"], 
    137               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
    138                "Solvent scattering length density"], 
    139               ["radius", "Ang", 20, [0, inf], "volume", "Cylinder radius"], 
    140               # TODO: use an expression for cap radius with fixed bounds. 
    141               # The current form requires cap radius R bigger than cylinder radius r. 
    142               # Could instead use R/r in [1,inf], r/R in [0,1], or the angle between 
    143               # cylinder and cap in [0,90].  The problem is similar for the barbell 
    144               # model.  Propose r/R in [0,1] in both cases, with the model specifying 
    145               # cylinder radius in the capped cylinder model and sphere radius in the 
    146               # barbell model.  This leads to the natural value of zero for no cap 
    147               # in the capped cylinder, and zero for no bar in the barbell model.  In 
    148               # both models, one would be a pill. 
    149               ["cap_radius", "Ang", 20, [0, inf], "volume", "Cap radius"], 
    150               ["length", "Ang", 400, [0, inf], "volume", "Cylinder length"], 
    151               ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], 
    152               ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], 
    153              ] 
    154  
    155 source = ["lib/J1.c", "lib/gauss76.c", "capped_cylinder.c"] 
    156  
    157 demo = dict(scale=1, background=0, 
    158             sld=6, solvent_sld=1, 
    159             radius=260, cap_radius=290, length=290, 
    160             theta=30, phi=15, 
    161             radius_pd=.2, radius_pd_n=1, 
    162             cap_radius_pd=.2, cap_radius_pd_n=1, 
    163             length_pd=.2, length_pd_n=10, 
    164             theta_pd=15, theta_pd_n=45, 
    165             phi_pd=15, phi_pd_n=1) 
    166 oldname = 'CappedCylinderModel' 
    167 oldpars = dict(sld='sld_capcyl', solvent_sld='sld_solv', 
    168                length='len_cyl', radius='rad_cyl', cap_radius='rad_cap') 
Note: See TracChangeset for help on using the changeset viewer.