Changeset 265c657 in sasmodels


Ignore:
Timestamp:
Mar 26, 2019 9:24:03 AM (6 years ago)
Author:
richardh
Branches:
master, ticket-1257-vesicle-product, ticket_1156, ticket_822_more_unit_tests
Children:
d8b7efa
Parents:
2464785
Message:

making _mode variables consistent

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/model_test.py

    rb297ba9 r265c657  
    392392        if par == product.RADIUS_MODE_ID: 
    393393            continue 
     394        if par == product.STRUCTURE_MODE_ID: 
     395            continue 
    394396        parts = par.split('_pd') 
    395397        if len(parts) > 1 and parts[1] not in ("", "_n", "nsigma", "type"): 
  • sasmodels/models/cylinder.py

    r0507e09 r265c657  
    219219cyl_vol = calc_volume(parameters[2][2], parameters[3][2]) 
    220220tests.extend([ 
    221     ({'radius_effective_mode': 0}, 0.1, None, None, r_effs[0], cyl_vol, 1.0), 
    222     ({'radius_effective_mode': 1}, 0.1, None, None, r_effs[1], None, None), 
    223     ({'radius_effective_mode': 2}, 0.1, None, None, r_effs[2], None, None), 
    224     ({'radius_effective_mode': 3}, 0.1, None, None, r_effs[3], None, None), 
    225     ({'radius_effective_mode': 4}, 0.1, None, None, r_effs[4], None, None), 
    226     ({'radius_effective_mode': 5}, 0.1, None, None, r_effs[5], None, None), 
    227     ({'radius_effective_mode': 6}, 0.1, None, None, r_effs[6], None, None), 
    228     ({'radius_effective_mode': 7}, 0.1, None, None, r_effs[7], None, None), 
     221    ({'effective_radius_mode': 0}, 0.1, None, None, r_effs[0], cyl_vol, 1.0), 
     222    ({'effective_radius_mode': 1}, 0.1, None, None, r_effs[1], None, None), 
     223    ({'effective_radius_mode': 2}, 0.1, None, None, r_effs[2], None, None), 
     224    ({'effective_radius_mode': 3}, 0.1, None, None, r_effs[3], None, None), 
     225    ({'effective_radius_mode': 4}, 0.1, None, None, r_effs[4], None, None), 
     226    ({'effective_radius_mode': 5}, 0.1, None, None, r_effs[5], None, None), 
     227    ({'effective_radius_mode': 6}, 0.1, None, None, r_effs[6], None, None), 
     228    ({'effective_radius_mode': 7}, 0.1, None, None, r_effs[7], None, None), 
    229229]) 
    230230del r_effs, cyl_vol 
  • sasmodels/models/sphere.py

    r2464785 r265c657  
    9898    [{"radius": 120., "radius_pd": 0.2, "radius_pd_n":45}, 
    9999     0.1, None, None, 120., None, 1.0], 
    100     [{"@S": "hardsphere"}, 0.1, 0.7940350343881906], # this is current value, not verified elsewhere yet 
    101 #       [{"@S": "hardsphere",          # hard sphere structure factor 
    102 #     "structure_factor_mode": 1,  # decoupling approximation  -  currently objecting to these new parameters 
    103 #     "effective_radius_mode": 1   # equivalent sphere 
    104 #        }, 0.1, None], 
     100    [{"@S": "hardsphere"}, 
     101       0.1, 0.7940350343881906], # this is current value, not verified elsewhere yet 
     102        [{"@S": "hardsphere",          # hard sphere structure factor 
     103     "structure_factor_mode": 1,  # decoupling approximation 
     104     "effective_radius_mode": 1   # equivalent sphere 
     105         }, 0.1, 0.7940350343881906], 
     106        [{"@S": "hardsphere",          # hard sphere structure factor 
     107     "structure_factor_mode": 2,  #  -  WHY same result? 
     108     "effective_radius_mode": 2   #  
     109         }, 0.1, 0.7940350343881906] 
    105110] 
    106111# putting None for expected result will pass the test if there are no errors from the routine, but without any check on the value of the result 
  • sasmodels/product.py

    rb297ba9 r265c657  
    3838 
    3939STRUCTURE_MODE_ID = "structure_factor_mode" 
    40 RADIUS_MODE_ID = "radius_effective_mode" 
     40RADIUS_MODE_ID = "effective_radius_mode" 
    4141RADIUS_ID = "radius_effective" 
    4242VOLFRAC_ID = "volfraction" 
Note: See TracChangeset for help on using the changeset viewer.