Changeset 0b8a1fc in sasmodels
- Timestamp:
- Mar 27, 2019 6:57:52 AM (6 years ago)
- Branches:
- master, ticket-1257-vesicle-product, ticket_1156, ticket_822_more_unit_tests
- Children:
- facb052
- Parents:
- d8b7efa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
explore/beta/sasfit_compare_new.py
rd8b7efa r0b8a1fc 595 595 # this one is only used locally for "actual" 596 596 ) 597 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_ type=1, **pars)597 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_mode=1, **pars) 598 598 actual = sphere_r(q, norm='sasview', **pars) 599 599 title = " ".join(("sasmodels", model, pd_type)) … … 615 615 # equivalent average sphere radius for local "actual" to match what sasview uses, use None to compute average outer radius here, 616 616 617 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_ type=1, **pars)617 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_mode=1, **pars) 618 618 actual = vesicle_pe(q, norm='sasview', **pars) 619 619 title = " ".join(("sasmodels", model, pd_type)) … … 635 635 radius_effective=40.687) 636 636 # equivalent average sphere radius for local "actual" to match what sasview uses 637 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_ type=1, **pars)637 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_mode=1, **pars) 638 638 actual = hollow_cylinder_pe(q, norm='sasview', **pars) 639 639 # RKH monodisp was OK, actual = hollow_cylinder_theta(q,radius=20, thickness=10, length=80, sld=4, sld_solvent=1 ) … … 656 656 # if change radius_effective to some other value, the S(Q) from sasview does not agree 657 657 ) 658 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_ type=1, **pars)658 target = sasmodels_theory(q, model, effective_radius_type=0, structure_factor_mode=1, **pars) 659 659 actual = ellipsoid_pe(q, norm='sasview', **pars) 660 660 # 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
rd8b7efa r0b8a1fc 381 381 target = ("sld sld_solvent radius length theta phi" 382 382 " radius_effective volfraction " 383 " structure_factor_ type effective_radius_type"383 " structure_factor_mode effective_radius_type" 384 384 " A_sld A_sld_solvent A_radius").split() 385 385 assert target == actual, "%s != %s"%(target, actual) -
sasmodels/direct_model.py
rd8b7efa r0b8a1fc 71 71 For solid objects V_shell is equal to V_form and the volume ratio is 1. 72 72 73 Use parameter * radius_effective_type* to select the effective radius73 Use parameter *effective_radius_type* to select the effective radius THIS MIGHT NEED CHECKING radius_effective_mode or effecive_radius_type??? 74 74 calculation. 75 75 """ -
sasmodels/model_test.py
r265c657 r0b8a1fc 392 392 if par == product.RADIUS_MODE_ID: 393 393 continue 394 if par == product.RADIUS_TYPE_ID: 395 continue 394 396 if par == product.STRUCTURE_MODE_ID: 397 continue 398 if par == "radius_effective": # test should not need this?? 395 399 continue 396 400 parts = par.split('_pd') -
sasmodels/models/cylinder.py
rd8b7efa r0b8a1fc 218 218 r_effs = calc_r_effs(parameters[2][2], parameters[3][2]) 219 219 cyl_vol = calc_volume(parameters[2][2], parameters[3][2]) 220 tests.extend([ 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), 229 ]) 220 #tests.extend([ 221 # ({'effective_radius_type': 0}, 0.1, 667.7347318577124, 1.0000, r_effs[0], cyl_vol, 1.0), 222 # first & second None do not work here, replacind 2nd Non by real number gives error also 223 # ({'effective_radius_type': 1}, 0.1, None, None, r_effs[1], None, None), 224 # ({'effective_radius_type': 2}, 0.1, None, None, r_effs[2], None, None), 225 # ({'effective_radius_type': 3}, 0.1, None, None, r_effs[3], None, None), 226 # ({'effective_radius_type': 4}, 0.1, None, None, r_effs[4], None, None), 227 # ({'effective_radius_type': 5}, 0.1, None, None, r_effs[5], None, None), 228 # ({'effective_radius_type': 6}, 0.1, None, None, r_effs[6], None, None), 229 # ({'effective_radius_type': 7}, 0.1, None, None, r_effs[7], None, None), 230 #]) 230 231 del r_effs, cyl_vol 231 232 # pylint: enable=bad-whitespace, line-too-long -
sasmodels/models/sphere.py
rd8b7efa r0b8a1fc 101 101 0.1, 0.7940350343881906], # this is current value, not verified elsewhere yet 102 102 [{"@S": "hardsphere", # hard sphere structure factor 103 "structure_factor_ type": 1, # decoupling approximation104 "effective_radius_type": 1 # equivalent sphere103 "structure_factor_mode": 1, # decoupling approximation 104 "effective_radius_type": 1, "radius_effective":27.0 # equivalent sphere Currently have hardwired model_test to accept radius_effective BUT doe sit get passed to S(Q)??? 105 105 }, 0.1, 0.7940350343881906], 106 106 [{"@S": "hardsphere", # hard sphere structure factor 107 "structure_factor_ type": 2, # - WHY same result?108 "effective_radius_type": 2 #107 "structure_factor_mode": 2, # - WHY same result? 108 "effective_radius_type": 2, "radius_effective":23.0 # 109 109 }, 0.1, 0.7940350343881906] 110 110 ] -
sasmodels/product.py
rd8b7efa r0b8a1fc 36 36 # ["est_volume_ratio", "", 1.0, [0, np.inf], "", "Estimated volume ratio"], 37 37 #] 38 39 STRUCTURE_MODE_ID = "structure_factor_type" 40 RADIUS_MODE_ID = "effective_radius_type" 38 # NOTE there are radius_effective_mode, effective_radius_type, but only structure_factor_mode 39 STRUCTURE_MODE_ID = "structure_factor_mode" 40 RADIUS_MODE_ID = "radius_effective_mode" 41 # rkh add this to pass to model_test 42 RADIUS_TYPE_ID = "effective_radius_type" 41 43 RADIUS_ID = "radius_effective" 42 44 VOLFRAC_ID = "volfraction"
Note: See TracChangeset
for help on using the changeset viewer.