Changeset 5024a56 in sasmodels
- Timestamp:
- Oct 30, 2018 6:37:19 PM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 99658f6
- Parents:
- 23df833
- Location:
- sasmodels
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/direct_model.py
r23df833 r5024a56 32 32 from .details import make_kernel_args, dispersion_mesh 33 33 from .modelinfo import DEFAULT_BACKGROUND 34 from .product import RADIUS_MODE_ID 34 35 35 36 # pylint: disable=unused-import … … 70 71 71 72 For solid objects V_shell is equal to V_form and the volume ratio is 1. 72 """ 73 R_eff_type = int(pars.pop('radius_effective_type', 1.0)) 73 74 Use parameter *radius_effective_mode* to select the effective radius 75 calculation. 76 """ 77 R_eff_type = int(pars.pop(RADIUS_MODE_ID, 1.0)) 74 78 mesh = get_mesh(calculator.info, pars, dim=calculator.dim, mono=mono) 75 79 #print("pars", list(zip(*mesh))[0]) -
sasmodels/model_test.py
raa8c6e0 r5024a56 386 386 for par in sorted(pars.keys()): 387 387 # special handling of R_eff mode, which is not a usual parameter 388 if par == 'radius_effective_type':388 if par == product.RADIUS_MODE_ID: 389 389 continue 390 390 parts = par.split('_pd') -
sasmodels/models/cylinder.py
r304c775 r5024a56 185 185 radius, length = parameters[2][2], parameters[3][2] 186 186 tests.extend([ 187 ({'radius_effective_ type': 0}, 0.1, None, None, 0., pi*radius**2*length, 1.0),188 ({'radius_effective_ type': 1}, 0.1, None, None, (0.75*radius**2*length)**(1./3.), None, None),189 ({'radius_effective_ type': 2}, 0.1, None, None, radius, None, None),190 ({'radius_effective_ type': 3}, 0.1, None, None, length/2., None, None),191 ({'radius_effective_ type': 4}, 0.1, None, None, min(radius, length/2.), None, None),192 ({'radius_effective_ type': 5}, 0.1, None, None, max(radius, length/2.), None, None),193 ({'radius_effective_ type': 6}, 0.1, None, None, np.sqrt(4*radius**2 + length**2)/2., None, None),187 ({'radius_effective_mode': 0}, 0.1, None, None, 0., pi*radius**2*length, 1.0), 188 ({'radius_effective_mode': 1}, 0.1, None, None, (0.75*radius**2*length)**(1./3.), None, None), 189 ({'radius_effective_mode': 2}, 0.1, None, None, radius, None, None), 190 ({'radius_effective_mode': 3}, 0.1, None, None, length/2., None, None), 191 ({'radius_effective_mode': 4}, 0.1, None, None, min(radius, length/2.), None, None), 192 ({'radius_effective_mode': 5}, 0.1, None, None, max(radius, length/2.), None, None), 193 ({'radius_effective_mode': 6}, 0.1, None, None, np.sqrt(4*radius**2 + length**2)/2., None, None), 194 194 ]) 195 195 del radius, length -
sasmodels/product.py
r39a06c9 r5024a56 37 37 #] 38 38 39 STRUCTURE_MODE_ID = "structure_factor_mode" 40 RADIUS_MODE_ID = "radius_effective_mode" 39 41 RADIUS_ID = "radius_effective" 40 42 VOLFRAC_ID = "volfraction" … … 43 45 if p_info.have_Fq: 44 46 par = parse_parameter( 45 "structure_factor_mode",47 STRUCTURE_MODE_ID, 46 48 "", 47 49 0, … … 52 54 if p_info.effective_radius_type is not None: 53 55 par = parse_parameter( 54 "radius_effective_mode",56 RADIUS_MODE_ID, 55 57 "", 56 58 0, -
sasmodels/sasview_model.py
raa8c6e0 r5024a56 859 859 P = _make_standard_model('cylinder')() 860 860 model = MultiplicationModel(P, S) 861 model.setParam( 'radius_effective_mode', 1.0)861 model.setParam(product.RADIUS_MODE_ID, 1.0) 862 862 value = model.evalDistribution([0.1, 0.1]) 863 863 if np.isnan(value):
Note: See TracChangeset
for help on using the changeset viewer.