Changeset da1c8d1 in sasmodels


Ignore:
Timestamp:
Sep 4, 2018 9:38:51 AM (6 years ago)
Author:
butler
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
eb3eb38
Parents:
992299c
Message:

remove VR from cs_shpere and cs_cylinder

Tested that unit tests pass and then P*Q has not been affected

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_cylinder.py

    r2d81cfe rda1c8d1  
    130130    Returns the effective radius used in the S*P calculation 
    131131    """ 
     132    print("radius") 
    132133    radius = radius + thickness 
    133134    length = length + 2 * thickness 
    134135    ddd = 0.75 * radius * (2 * radius * length + (length + radius) * (length + pi * radius)) 
    135136    return 0.5 * (ddd) ** (1. / 3.) 
    136  
    137 def VR(radius, thickness, length): 
    138     """ 
    139     Returns volume ratio 
    140     """ 
    141     whole = pi * (radius + thickness) ** 2 * (length + 2 * thickness) 
    142     core = pi * radius ** 2 * length 
    143     return whole, whole - core 
    144137 
    145138def random(): 
  • sasmodels/models/core_shell_sphere.py

    rdc76240 rda1c8d1  
    8989    return radius + thickness 
    9090 
    91 def VR(radius, thickness): 
    92     """ 
    93         Volume ratio 
    94         @param radius: core radius 
    95         @param thickness: shell thickness 
    96     """ 
    97     return (1, 1) 
    98     whole = 4.0/3.0 * pi * (radius + thickness)**3 
    99     core = 4.0/3.0 * pi * radius**3 
    100     return whole, whole - core 
    101  
    10291def random(): 
    10392    outer_radius = 10**np.random.uniform(1.3, 4.3) 
     
    114103tests = [ 
    115104    [{'radius': 20.0, 'thickness': 10.0}, 'ER', 30.0], 
    116     # TODO: VR test suppressed until we sort out new product model 
    117     # and determine what to do with volume ratio. 
    118     #[{'radius': 20.0, 'thickness': 10.0}, 'VR', 0.703703704], 
    119105 
    120106    # The SasView test result was 0.00169, with a background of 0.001 
Note: See TracChangeset for help on using the changeset viewer.