Changeset ff7119b in sasmodels for sasmodels/dll.py
- Timestamp:
- Aug 26, 2014 8:27:06 PM (10 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:
- 5d4777d
- Parents:
- a7684e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/dll.py
rce27e21 rff7119b 26 26 for single and 'd', 'float64' or 'double' for double. Double precision 27 27 is an optional extension which may not be available on all devices. 28 29 Call :meth:`release` when done with the kernel. 28 30 """ 29 31 def __init__(self, dllpath, info): … … 69 71 return DllInput(q_vectors) 70 72 73 def release(self): 74 pass # TODO: should release the dll 75 71 76 72 77 class DllInput(object): … … 100 105 101 106 class DllKernel(object): 107 """ 108 Callable SAS kernel. 109 110 *kernel* is the DllKernel object to call. 111 112 *info* is the module information 113 114 *input* is the DllInput q vectors at which the kernel should be 115 evaluated. 116 117 The resulting call method takes the *pars*, a list of values for 118 the fixed parameters to the kernel, and *pd_pars*, a list of (value,weight) 119 vectors for the polydisperse parameters. *cutoff* determines the 120 integration limits: any points with combined weight less than *cutoff* 121 will not be calculated. 122 123 Call :meth:`release` when done with the kernel instance. 124 """ 102 125 def __init__(self, kernel, info, input): 103 126 self.input = input 104 127 self.kernel = kernel 105 self.info = info106 128 self.res = np.empty(input.nq, input.dtype) 107 129 dim = '2d' if input.is_2D else '1d'
Note: See TracChangeset
for help on using the changeset viewer.