Changeset 445d1c0 in sasmodels
- Timestamp:
- Mar 21, 2016 4:08:33 PM (9 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:
- 88aa3ee
- Parents:
- a4e2ae5
- Location:
- sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r1edf610 r445d1c0 222 222 """ 223 223 if mono: 224 values = [pars.get(p.name, p.default) for p in kernel.info['parameters']] 225 weights = [1.0]*len(values) 224 active = set() 225 elif kernel.dim == '1d': 226 active = set(kernel.info['par_type']['1d']) 227 elif kernel.dim == '2d': 228 active = set(kernel.info['par_type']['2d']) 226 229 else: 227 230 vw_pairs = [get_weights(p, pars) for p in kernel.info['parameters']] 228 values, weights = zip(*vw_pairs) 229 230 #TODO: This is what we thought to do if max([len(w) for w in weights]) > 1: 231 print("from") 232 import pprint; pprint.pprint(weights) 233 print("to") 231 232 vw_pairs = [(get_weights(p, pars) if p.name in active else ([p.default], [1])) 233 for p in kernel.info['parameters']] 234 values, weights = zip(*vw_pairs) 235 234 236 if max([len(w) for w in weights]) > 1: 235 237 details = generate.poly_details(kernel.info, weights) -
sasmodels/kernelcl.py
rc072f83 r445d1c0 446 446 q_input = GpuInput(q_vectors, dtype) 447 447 self.dtype = dtype 448 self.dim = '2d' if q_input.is_2d else '1d' 448 449 self.kernel = kernel 449 450 self.info = model_info … … 452 453 # plus three for the normalization values 453 454 self.result = np.empty(q_input.nq+3, q_input.dtype) 454 #self.dim = '2d' if q_input.is_2d else '1d'455 455 456 456 # Inputs and outputs for each kernel call -
sasmodels/kerneldll.py
r0880966 r445d1c0 256 256 self.kernel = kernel 257 257 self.res = np.empty(q_input.nq+3, q_input.dtype) 258 dim = '2d' if q_input.is_2d else '1d' 259 self.parameters = model_info['par_type'][dim] 258 self.dim = '2d' if q_input.is_2d else '1d' 260 259 261 260 # In dll kernel, but not in opencl kernel
Note: See TracChangeset
for help on using the changeset viewer.