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_rectangular_prism.py

    r40a87fa ra807206  
    105105              ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "sld", 
    106106               "Solvent scattering length density"], 
    107               ["a_side", "Ang", 35, [0, inf], "volume", 
     107              ["length_a", "Ang", 35, [0, inf], "volume", 
    108108               "Shorter side of the parallelepiped"], 
    109109              ["b2a_ratio", "Ang", 1, [0, inf], "volume", 
     
    117117source = ["lib/gauss76.c", "hollow_rectangular_prism.c"] 
    118118 
    119 def ER(a_side, b2a_ratio, c2a_ratio, thickness): 
     119def ER(length_a, b2a_ratio, c2a_ratio, thickness): 
    120120    """ 
    121121    Return equivalent radius (ER) 
    122122    thickness parameter not used 
    123123    """ 
    124     b_side = a_side * b2a_ratio 
    125     c_side = a_side * c2a_ratio 
     124    b_side = length_a * b2a_ratio 
     125    c_side = length_a * c2a_ratio 
    126126 
    127127    # surface average radius (rough approximation) 
    128     surf_rad = sqrt(a_side * b_side / pi) 
     128    surf_rad = sqrt(length_a * b_side / pi) 
    129129 
    130130    ddd = 0.75 * surf_rad * (2 * surf_rad * c_side + (c_side + surf_rad) * (c_side + pi * surf_rad)) 
    131131    return 0.5 * (ddd) ** (1. / 3.) 
    132132 
    133 def VR(a_side, b2a_ratio, c2a_ratio, thickness): 
     133def VR(length_a, b2a_ratio, c2a_ratio, thickness): 
    134134    """ 
    135135    Return shell volume and total volume 
    136136    """ 
    137     b_side = a_side * b2a_ratio 
    138     c_side = a_side * c2a_ratio 
    139     a_core = a_side - 2.0*thickness 
     137    b_side = length_a * b2a_ratio 
     138    c_side = length_a * c2a_ratio 
     139    a_core = length_a - 2.0*thickness 
    140140    b_core = b_side - 2.0*thickness 
    141141    c_core = c_side - 2.0*thickness 
    142142    vol_core = a_core * b_core * c_core 
    143     vol_total = a_side * b_side * c_side 
     143    vol_total = length_a * b_side * c_side 
    144144    vol_shell = vol_total - vol_core 
    145145    return vol_total, vol_shell 
     
    149149demo = dict(scale=1, background=0, 
    150150            sld=6.3e-6, sld_solvent=1.0e-6, 
    151             a_side=35, b2a_ratio=1, c2a_ratio=1, thickness=1, 
    152             a_side_pd=0.1, a_side_pd_n=10, 
     151            length_a=35, b2a_ratio=1, c2a_ratio=1, thickness=1, 
     152            length_a_pd=0.1, length_a_pd_n=10, 
    153153            b2a_ratio_pd=0.1, b2a_ratio_pd_n=1, 
    154154            c2a_ratio_pd=0.1, c2a_ratio_pd_n=1) 
Note: See TracChangeset for help on using the changeset viewer.