Changes in / [4de1ac0f:aa24114] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/capped_cylinder.py

    r26141cb re65a3e7  
    33Like :ref:`barbell`, this is a sphereocylinder with end caps that have a 
    44radius larger than that of the cylinder, but with the center of the end cap 
    5 radius lying within the cylinder. This model simply becomes the a convex 
     5radius lying within the cylinder. This model simply becomes a convex 
    66lens when the length of the cylinder $L=0$. See the diagram for the details 
    77of the geometry and restrictions on parameter values. 
     
    9595    end cap radius lies within the cylinder. 
    9696    Note: As the length of cylinder -->0, 
    97     it becomes a ConvexLens. 
     97    it becomes a Convex Lens. 
    9898    It must be that radius <(=) cap_radius. 
    9999    [Parameters]; 
     
    104104    cap_radius: radius of the semi-spherical cap, 
    105105    sld: SLD of the capped cylinder, 
    106     solvent_sld: SLD of the solvent. 
     106    sld_solvent: SLD of the solvent. 
    107107""" 
    108108category = "shape:cylinder" 
     
    110110#             ["name", "units", default, [lower, upper], "type", "description"], 
    111111parameters = [["sld",         "1e-6/Ang^2", 4, [-inf, inf], "",       "Cylinder scattering length density"], 
    112               ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "",       "Solvent scattering length density"], 
     112              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "",       "Solvent scattering length density"], 
    113113              ["radius",      "Ang",       20, [0, inf],    "volume", "Cylinder radius"], 
    114114 
     
    132132 
    133133demo = dict(scale=1, background=0, 
    134             sld=6, solvent_sld=1, 
     134            sld=6, sld_solvent=1, 
    135135            radius=260, cap_radius=290, length=290, 
    136136            theta=30, phi=15, 
     
    142142oldname = 'CappedCylinderModel' 
    143143oldpars = dict(sld='sld_capcyl', 
    144                solvent_sld='sld_solv', 
     144               sld_solvent='sld_solv', 
    145145               length='len_cyl', 
    146146               radius='rad_cyl', 
  • sasmodels/models/elliptical_cylinder.py

    r43b7eea re65a3e7  
    1212.. figure:: img/elliptical_cylinder_geometry.png 
    1313 
    14     *a* = *r_minor* and |nu|\ :sub:`n` = $r_ratio$ (i.e., $r_major / r_minor$). 
     14   Elliptical cylinder geometry $a$ = $r_{minor}$ and \nu = $r_{ratio}$ = $r_{major} / r_{minor}$ 
    1515 
    1616The function calculated is 
     
    2626    F(\mathbf{q},\alpha,\psi)=2\frac{J_1(a)\sin(b)}{ab} 
    2727    \\ 
    28     a = \mathbf{q}\sin(\alpha)\left[ r^2_{major}\sin^2(\psi)+r^2_{minor}\cos(\psi) \right]^{1/2} 
     28    where  a = \mathbf{q}\sin(\alpha)\left[ r^2_{major}\sin^2(\psi)+r^2_{minor}\cos(\psi) \right]^{1/2} 
    2929    \\ 
    3030    b=\mathbf{q}\frac{L}{2}\cos(\alpha) 
     
    7474    The intensities averaged from 2D over different numbers of bins and angles. 
    7575 
    76 Reference 
    77 --------- 
     76References 
     77---------- 
    7878 
    7979L A Feigin and D I Svergun, *Structure Analysis by Small-Angle X-Ray and Neutron Scattering*, Plenum, 
     
    9898              ["length",      "Ang",        400.0, [1, inf],    "volume",      "Length of the cylinder"], 
    9999              ["sld",         "1e-6/Ang^2", 4.0,   [-inf, inf], "",            "Cylinder scattering length density"], 
    100               ["solvent_sld", "1e-6/Ang^2", 1.0,   [-inf, inf], "",            "Solvent scattering length density"], 
     100              ["sld_solvent", "1e-6/Ang^2", 1.0,   [-inf, inf], "",            "Solvent scattering length density"], 
    101101              ["theta",       "degrees",    90.0,  [-360, 360], "orientation", "In plane angle"], 
    102102              ["phi",         "degrees",    0,     [-360, 360], "orientation", "Out of plane angle"], 
     
    108108 
    109109demo = dict(scale=1, background=0, r_minor=100, r_ratio=1.5, length=400.0, 
    110             sld=4.0, solvent_sld=1.0, theta=10.0, phi=20, psi=30, theta_pd=10, phi_pd=2, psi_pd=3) 
     110            sld=4.0, sld_solvent=1.0, theta=10.0, phi=20, psi=30, theta_pd=10, phi_pd=2, psi_pd=3) 
    111111 
    112112oldname = 'EllipticalCylinderModel' 
    113 oldpars = dict(theta='cyl_theta', phi='cyl_phi', psi='cyl_psi', sld='sldCyl', solvent_sld='sldSolv') 
     113oldpars = dict(theta='cyl_theta', phi='cyl_phi', psi='cyl_psi', sld='sldCyl', sld_solvent='sldSolv') 
    114114 
    115115def ER(r_minor, r_ratio, length): 
     
    132132           'sld': 4.0, 
    133133           'length':400.0, 
    134            'solvent_sld':1.0, 
     134           'sld_solvent':1.0, 
    135135           'background':0.0 
    136136          }, 0.001, 675.504402]] 
  • sasmodels/models/flexible_cylinder.py

    r26141cb re65a3e7  
    3030The Kuhn length $(b = 2*l_p)$ is also used to describe the stiffness of a chain. 
    3131 
    32 The returned value is in units of $cm^-1$, on absolute scale. 
     32The returned value is in units of $cm^{-1}$, on absolute scale. 
    3333 
    3434In the parameters, the sldCyl and sldSolv represent the SLD of the chain/cylinder 
     
    6565title = "Flexible cylinder where the form factor is normalized by the volume" \ 
    6666        "of the cylinder." 
    67 description = """Note : scale and contrast=sld-solvent_sld are both 
     67description = """Note : scale and contrast = (sld - sld_solvent) are both 
    6868                multiplicative factors in the model and are perfectly 
    6969                correlated. One or both of these parameters must be held fixed 
     
    7272 
    7373category = "shape:cylinder" 
    74 single = False 
     74single = False  # double precision only! 
    7575 
    7676# pylint: disable=bad-whitespace, line-too-long 
     
    8181    ["radius",      "Ang",         20.0, [0, inf],    "volume", "Radius of the flexible cylinder"], 
    8282    ["sld",         "1e-6/Ang^2",   1.0, [-inf, inf], "",       "Cylinder scattering length density"], 
    83     ["solvent_sld", "1e-6/Ang^2",   6.3, [-inf, inf], "",       "Solvent scattering length density"], 
     83    ["sld_solvent", "1e-6/Ang^2",   6.3, [-inf, inf], "",       "Solvent scattering length density"], 
    8484    ] 
    8585# pylint: enable=bad-whitespace, line-too-long 
     
    9191            radius=20.0, 
    9292            sld=1.0, 
    93             solvent_sld=6.3) 
     93            sld_solvent=6.3) 
    9494 
    9595oldname = 'FlexibleCylinderModel' 
    96 oldpars = dict(sld='sldCyl', solvent_sld='sldSolv') 
     96oldpars = dict(sld='sldCyl', sld_solvent='sldSolv') 
    9797 
    9898 
     
    104104    #  'radius':       20.0, 
    105105    #  'sld':           1.0, 
    106     #  'solvent_sld':   6.3, 
     106    #  'sld_solvent':   6.3, 
    107107    #  'background':    0.0001, 
    108108    #  }, 0.001, 3509.2187], 
     
    113113      'radius':       20.0, 
    114114      'sld':           1.0, 
    115       'solvent_sld':   6.3, 
     115      'sld_solvent':   6.3, 
    116116      'background':    0.0001, 
    117117     }, 1.0, 0.000595345], 
     
    120120      'radius':        2.0, 
    121121      'sld':           6.0, 
    122       'solvent_sld':  12.3, 
     122      'sld_solvent':  12.3, 
    123123      'background':    0.001, 
    124124     }, 0.1, 1.55228], 
     
    127127      'radius':       50.0, 
    128128      'sld':           0.1, 
    129       'solvent_sld':   5.1, 
     129      'sld_solvent':   5.1, 
    130130      'background':    0.0, 
    131131     }, 1.0, 0.000938456] 
Note: See TracChangeset for help on using the changeset viewer.