Changeset a807206 in sasmodels for sasmodels/models/hollow_cylinder.py


Ignore:
Timestamp:
Sep 30, 2016 10:42:06 PM (8 years ago)
Author:
butler
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:
caddb14, 5031ca3
Parents:
2222134
Message:

updating more parameter names addressing #649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_cylinder.py

    r58210db ra807206  
    3939 
    4040In the parameters, the contrast represents SLD :sub:`shell` - SLD :sub:`solvent` 
    41 and the *radius* is $R_\text{shell}$ while *core_radius* is $R_\text{core}$. 
     41and the *radius* is $R_\text{shell}$ while *radius_core* is $R_\text{core}$. 
    4242 
    4343To provide easy access to the orientation of the core-shell cylinder, we define 
     
    5858description = """ 
    5959P(q) = scale*<f*f>/Vol + background, where f is the scattering amplitude. 
    60 core_radius = the radius of core 
     60radius_core = the radius of core 
    6161radius = the radius of shell 
    6262length = the total length of the cylinder 
     
    7070parameters = [ 
    7171    ["radius",      "Ang",     30.0, [0, inf],    "volume",      "Cylinder radius"], 
    72     ["core_radius", "Ang",     20.0, [0, inf],    "volume",      "Hollow core radius"], 
     72    ["radius_core", "Ang",     20.0, [0, inf],    "volume",      "Hollow core radius"], 
    7373    ["length",      "Ang",    400.0, [0, inf],    "volume",      "Cylinder length"], 
    7474    ["sld",         "1/Ang^2",  6.3, [-inf, inf], "sld",         "Cylinder sld"], 
     
    8282 
    8383# pylint: disable=W0613 
    84 def ER(radius, core_radius, length): 
     84def ER(radius, radius_core, length): 
    8585    """ 
    8686    :param radius:      Cylinder radius 
    87     :param core_radius: Hollow core radius, UNUSED 
     87    :param radius_core: Hollow core radius, UNUSED 
    8888    :param length:      Cylinder length 
    8989    :return:            Effective radius 
     
    9999    return diam 
    100100 
    101 def VR(radius, core_radius, length): 
     101def VR(radius, radius_core, length): 
    102102    """ 
    103103    :param radius:      Cylinder radius 
    104     :param core_radius: Hollow core radius 
     104    :param radius_core: Hollow core radius 
    105105    :param length:      Cylinder length 
    106106    :return:            Volf ratio for P(q)*S(q) 
    107107    """ 
    108     vol_core = pi*core_radius*core_radius*length 
     108    vol_core = pi*radius_core*radius_core*length 
    109109    vol_total = pi*radius*radius*length 
    110110    vol_shell = vol_total - vol_core 
     
    113113# parameters for demo 
    114114demo = dict(scale=1.0, background=0.0, length=400.0, radius=30.0, 
    115             core_radius=20.0, sld=6.3, sld_solvent=1, theta=90, phi=0, 
     115            radius_core=20.0, sld=6.3, sld_solvent=1, theta=90, phi=0, 
    116116            radius_pd=.2, radius_pd_n=9, 
    117117            length_pd=.2, length_pd_n=10, 
    118             core_radius_pd=.2, core_radius_pd_n=9, 
     118            radius_core_pd=.2, radius_core_pd_n=9, 
    119119            theta_pd=10, theta_pd_n=5, 
    120120           ) 
Note: See TracChangeset for help on using the changeset viewer.