Changeset 74fd96f in sasmodels


Ignore:
Timestamp:
Mar 20, 2016 5:18:22 AM (8 years ago)
Author:
richardh
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
dd27e0c
Parents:
fc7aa39
Message:

renamed r_ratio to axis_ratio

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/elliptical_cylinder.py

    raa24114 r74fd96f  
    1212.. figure:: img/elliptical_cylinder_geometry.png 
    1313 
    14    Elliptical cylinder geometry $a$ = $r_{minor}$ and \nu = $r_{ratio}$ = $r_{major} / r_{minor}$ 
     14   Elliptical cylinder geometry $a$ = $r_{minor}$ and \nu = $axis\_ratio$ = $r_{major} / r_{minor}$ 
    1515 
    1616The function calculated is 
     
    5757    Examples of the angles for oriented elliptical cylinders against the detector plane. 
    5858 
    59 NB: The 2nd virial coefficient of the cylinder is calculated based on the averaged radius (= sqrt(*r_minor*\ :sup:`2` \* *r_ratio*)) 
     59NB: The 2nd virial coefficient of the cylinder is calculated based on the averaged radius (= sqrt(*r_minor*\ :sup:`2` \* *axis_ratio*)) 
    6060and length values, and used as the effective radius for *S(Q)* when *P(Q)* \* *S(Q)* is applied. 
    6161 
     
    9595#             ["name", "units", default, [lower, upper], "type","description"], 
    9696parameters = [["r_minor",     "Ang",        20.0,  [0, inf],    "volume",      "Ellipse minor radius"], 
    97               ["r_ratio",     "",           1.5,   [1, inf],    "volume",      "Ratio of major radius over minor radius"], 
     97              ["axis_ratio",     "",           1.5,   [1, inf],    "volume",      "Ratio of major radius over minor radius"], 
    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"], 
     
    107107source = ["lib/polevl.c","lib/sas_J1.c", "lib/gauss76.c", "lib/gauss20.c", "elliptical_cylinder.c"] 
    108108 
    109 demo = dict(scale=1, background=0, r_minor=100, r_ratio=1.5, length=400.0, 
     109demo = dict(scale=1, background=0, r_minor=100, axis_ratio=1.5, length=400.0, 
    110110            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', sld_solvent='sldSolv') 
     113oldpars = dict(axis_ratio="r_ratio",theta='cyl_theta', phi='cyl_phi', psi='cyl_psi', sld='sldCyl', sld_solvent='sldSolv') 
    114114 
    115 def ER(r_minor, r_ratio, length): 
     115def ER(r_minor, axis_ratio, length): 
    116116    """ 
    117117        Equivalent radius 
    118118        @param r_minor: Ellipse minor radius 
    119         @param r_ratio: Ratio of major radius over minor radius 
     119        @param axis_ratio: Ratio of major radius over minor radius 
    120120        @param length: Length of the cylinder 
    121121    """ 
    122     radius = math.sqrt(r_minor * r_minor * r_ratio) 
     122    radius = math.sqrt(r_minor * r_minor * axis_ratio) 
    123123    ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 
    124124    return 0.5 * (ddd) ** (1. / 3.) 
    125125 
    126 tests = [[{'r_minor': 20.0, 'r_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024], 
    127          [{'r_minor': 20.0, 'r_ratio': 1.2, 'length':300.0}, 'VR', 1], 
     126tests = [[{'r_minor': 20.0, 'axis_ratio': 1.5, 'length':400.0}, 'ER', 79.89245454155024], 
     127         [{'r_minor': 20.0, 'axis_ratio': 1.2, 'length':300.0}, 'VR', 1], 
    128128 
    129129         # The SasView test result was 0.00169, with a background of 0.001 
    130130         [{'r_minor': 20.0, 
    131            'r_ratio': 1.5, 
     131           'axis_ratio': 1.5, 
    132132           'sld': 4.0, 
    133133           'length':400.0, 
  • sasmodels/models/flexible_cylinder_ex.py

    rce8bed9 r74fd96f  
    102102    ["length",      "Ang",       1000.0, [0, inf],    "volume", "Length of the flexible cylinder"], 
    103103    ["kuhn_length", "Ang",        100.0, [0, inf],    "volume", "Kuhn length of the flexible cylinder"], 
    104     ["radius",      "Ang",         20.0, [0, inf],    "volume", "Radius of the flexible cylinder"], 
     104    ["radius",      "Ang",         20.0, [1, inf],    "volume", "Radius of the flexible cylinder"], 
    105105    ["axis_ratio",  "",             1.5, [0, inf],    "",       "Axis_ratio (major_radius/minor_radius"], 
    106106    ["sld",         "1e-6/Ang^2",   1.0, [-inf, inf], "",       "Cylinder scattering length density"], 
Note: See TracChangeset for help on using the changeset viewer.