Changeset d15a908 in sasmodels for sasmodels/core.py
- Timestamp:
- Jan 27, 2016 5:35:15 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- fdc538a
- Parents:
- 37a7252
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
rcde11f0f rd15a908 2 2 Core model handling routines. 3 3 """ 4 __all__ = ["list_models", "load_model_definition", "precompile_dll", 5 "load_model", "make_kernel", "call_kernel", "call_ER", "call_VR" ] 4 __all__ = [ 5 "list_models", "load_model_definition", "precompile_dll", 6 "load_model", "make_kernel", "call_kernel", "call_ER", "call_VR", 7 ] 6 8 7 9 from os.path import basename, dirname, join as joinpath … … 61 63 62 64 def isstr(s): 65 """ 66 Return True if *s* is a string-like object. 67 """ 63 68 try: s + '' 64 69 except: return False … … 99 104 # source = open(info['name']+'.cl','r').read() 100 105 101 if (platform =="dll"106 if (platform == "dll" 102 107 or not HAVE_OPENCL 103 108 or not kernelcl.environment().has_type(dtype)): … … 128 133 width = pars.get(name+'_pd', 0.0) 129 134 nsigma = pars.get(name+'_pd_nsigma', 3.0) 130 value, weight = weights.get_weights(135 value, weight = weights.get_weights( 131 136 disperser, npts, width, nsigma, value, limits, relative) 132 137 return value, weight / np.sum(weight) … … 195 200 for name in info['partype']['volume']] 196 201 value, weight = dispersion_mesh(vol_pars) 197 whole, part = VR(*value)202 whole, part = VR(*value) 198 203 return np.sum(weight*part)/np.sum(weight*whole) 199 204
Note: See TracChangeset
for help on using the changeset viewer.