Changeset 17bbadd in sasmodels for sasmodels/kernelpy.py
- Timestamp:
- Mar 15, 2016 12:47:12 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:
- 754e27b
- Parents:
- 5ceb7d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelpy.py
reafc9fa r17bbadd 16 16 Wrapper for pure python models. 17 17 """ 18 def __init__(self, info):19 self.info = info18 def __init__(self, model_info): 19 self.info = model_info 20 20 21 21 def __call__(self, q_vectors): … … 68 68 *kernel* is the DllKernel object to call. 69 69 70 * info* is the module information70 *model_info* is the module information 71 71 72 72 *q_input* is the DllInput q vectors at which the kernel should be … … 81 81 Call :meth:`release` when done with the kernel instance. 82 82 """ 83 def __init__(self, kernel, info, q_input):84 self.info = info83 def __init__(self, kernel, model_info, q_input): 84 self.info = model_info 85 85 self.q_input = q_input 86 86 self.res = np.empty(q_input.nq, q_input.dtype) … … 106 106 else: 107 107 self.kernel = kernel 108 fixed_pars = info['partype']['fixed-' + dim]109 pd_pars = info['partype']['pd-' + dim]110 vol_pars = info['partype']['volume']108 fixed_pars = model_info['partype']['fixed-' + dim] 109 pd_pars = model_info['partype']['pd-' + dim] 110 vol_pars = model_info['partype']['volume'] 111 111 112 112 # First two fixed pars are scale and background 113 pars = [p[0] for p in info['parameters'][2:]]113 pars = [p[0] for p in model_info['parameters'][2:]] 114 114 offset = len(self.q_input.q_vectors) 115 115 self.args = self.q_input.q_vectors + [None] * len(pars)
Note: See TracChangeset
for help on using the changeset viewer.