Changeset d8b7efa in sasmodels


Ignore:
Timestamp:
Mar 27, 2019 4:41:11 AM (5 years ago)
Author:
richardh
Branches:
master, ticket-1257-vesicle-product, ticket_1156, ticket_822_more_unit_tests
Children:
0b8a1fc
Parents:
265c657
Message:

more changes to variable names, but now lost radius_effective in S(Q), so this is not working yet

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • explore/beta/sasfit_compare_new.py

    rb6422c7 rd8b7efa  
    595595#       this one is only used locally for "actual" 
    596596        ) 
    597     target = sasmodels_theory(q, model, effective_radius_mode=0, structure_factor_mode=1, **pars) 
     597    target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_type=1, **pars) 
    598598    actual = sphere_r(q, norm='sasview', **pars) 
    599599    title = " ".join(("sasmodels", model, pd_type)) 
     
    615615        # equivalent average sphere radius for local "actual" to match what sasview uses, use None to compute average outer radius here, 
    616616 
    617     target = sasmodels_theory(q, model, effective_radius_mode=0, structure_factor_mode=1, **pars) 
     617    target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_type=1, **pars) 
    618618    actual = vesicle_pe(q, norm='sasview', **pars) 
    619619    title = " ".join(("sasmodels", model, pd_type)) 
     
    635635        radius_effective=40.687)   
    636636        # equivalent average sphere radius for local "actual" to match what sasview uses 
    637     target = sasmodels_theory(q, model, effective_radius_mode=0, structure_factor_mode=1, **pars) 
     637    target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_type=1, **pars) 
    638638    actual = hollow_cylinder_pe(q, norm='sasview', **pars) 
    639639# RKH monodisp was OK,    actual = hollow_cylinder_theta(q,radius=20, thickness=10, length=80, sld=4, sld_solvent=1 ) 
     
    656656# if change radius_effective to some other value, the S(Q) from sasview does not agree 
    657657        ) 
    658     target = sasmodels_theory(q, model, effective_radius_mode=0, structure_factor_mode=1, **pars) 
     658    target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_type=1, **pars) 
    659659    actual = ellipsoid_pe(q, norm='sasview', **pars) 
    660660# RKH test       actual = ellipsoid_theta(q, radius_polar=20, radius_equatorial=400, sld=4, sld_solvent=1, volfraction=0.15, radius_effective=270.) 
  • sasmodels/core.py

    rb297ba9 rd8b7efa  
    381381    target = ("sld sld_solvent radius length theta phi" 
    382382              " radius_effective volfraction " 
    383               " structure_factor_mode radius_effective_mode" 
     383              " structure_factor_type effective_radius_type" 
    384384              " A_sld A_sld_solvent A_radius").split() 
    385385    assert target == actual, "%s != %s"%(target, actual) 
  • sasmodels/direct_model.py

    rb297ba9 rd8b7efa  
    7171    For solid objects V_shell is equal to V_form and the volume ratio is 1. 
    7272 
    73     Use parameter *radius_effective_mode* to select the effective radius 
     73    Use parameter *radius_effective_type* to select the effective radius 
    7474    calculation. 
    7575    """ 
  • sasmodels/models/cylinder.py

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

    r265c657 rd8b7efa  
    101101       0.1, 0.7940350343881906], # this is current value, not verified elsewhere yet 
    102102        [{"@S": "hardsphere",          # hard sphere structure factor 
    103      "structure_factor_mode": 1,  # decoupling approximation 
    104      "effective_radius_mode": 1   # equivalent sphere 
     103     "structure_factor_type": 1,  # decoupling approximation 
     104     "effective_radius_type": 1   # equivalent sphere 
    105105         }, 0.1, 0.7940350343881906], 
    106106        [{"@S": "hardsphere",          # hard sphere structure factor 
    107      "structure_factor_mode": 2,  #  -  WHY same result? 
    108      "effective_radius_mode": 2   #  
     107     "structure_factor_type": 2,  #  -  WHY same result? 
     108     "effective_radius_type": 2   #  
    109109         }, 0.1, 0.7940350343881906] 
    110110] 
  • sasmodels/product.py

    r265c657 rd8b7efa  
    3737#] 
    3838 
    39 STRUCTURE_MODE_ID = "structure_factor_mode" 
    40 RADIUS_MODE_ID = "effective_radius_mode" 
     39STRUCTURE_MODE_ID = "structure_factor_type" 
     40RADIUS_MODE_ID = "effective_radius_type" 
    4141RADIUS_ID = "radius_effective" 
    4242VOLFRAC_ID = "volfraction" 
     
    4444    # type: (ModelInfo) -> List[Parameter] 
    4545    """ 
    46     Create parameters for structure_factor_mode and radius_effective_mode. 
     46    Create parameters for structure_factor_type and radius_effective_type. 
    4747    """ 
    4848    pars = [] 
Note: See TracChangeset for help on using the changeset viewer.