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


Ignore:
Timestamp:
Sep 10, 2018 2:16:46 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
d299327
Parents:
3f818b2
Message:

clean up effective radius functions; improve mono_gauss_coil accuracy; start moving VR into C

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_cylinder.py

    r2cc8aa2 ree60aa7  
    100100source = ["lib/polevl.c", "lib/sas_J1.c", "lib/gauss76.c", "hollow_cylinder.c"] 
    101101have_Fq = True 
    102 effective_radius_type = ["equivalent sphere","outer radius","half length", 
    103                          "half outer min dimension","half outer max dimension","half outer diagonal"] 
    104  
    105 # pylint: disable=W0613 
    106 #def ER(radius, thickness, length): 
    107 #    """ 
    108 #    :param radius:      Cylinder core radius 
    109 #    :param thickness:   Cylinder wall thickness 
    110 #    :param length:      Cylinder length 
    111 #    :return:            Effective radius 
    112 #    """ 
    113 #    router = radius + thickness 
    114 #    if router == 0 or length == 0: 
    115 #        return 0.0 
    116 #    len1 = router 
    117 #    len2 = length/2.0 
    118 #    term1 = len1*len1*2.0*len2/2.0 
    119 #    term2 = 1.0 + (len2/len1)*(1.0 + 1/len2/2.0)*(1.0 + pi*len1/len2/2.0) 
    120 #    ddd = 3.0*term1*term2 
    121 #    diam = pow(ddd, (1.0/3.0)) 
    122 #    return diam 
    123  
    124 def VR(radius, thickness, length): 
    125     """ 
    126     :param radius:      Cylinder radius 
    127     :param thickness:   Cylinder wall thickness 
    128     :param length:      Cylinder length 
    129     :return:            Volf ratio for P(q)*S(q) 
    130     """ 
    131     router = radius + thickness 
    132     vol_core = pi*radius*radius*length 
    133     vol_total = pi*router*router*length 
    134     vol_shell = vol_total - vol_core 
    135     return vol_total, vol_shell 
     102effective_radius_type = [ 
     103    "equivalent sphere", "outer radius", "half length", 
     104    "half outer min dimension", "half outer max dimension", 
     105    "half outer diagonal", 
     106    ] 
    136107 
    137108def random(): 
Note: See TracChangeset for help on using the changeset viewer.