Changeset 31641b2 in sasmodels
- Timestamp:
- Mar 21, 2016 2:20:32 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:
- abc03d8
- Parents:
- afda63c (diff), 88aa3ee (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- sasmodels
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/compare.py
r1edf610 ra4e2ae5 452 452 """ 453 453 # initialize the code so time is more accurate 454 #value = calculator(**suppress_pd(pars)) 454 if Nevals > 1: 455 value = calculator(**suppress_pd(pars)) 455 456 toc = tic() 456 457 for _ in range(max(Nevals, 1)): # make sure there is at least one eval -
sasmodels/core.py
r1edf610 r88aa3ee 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) 226 else: 227 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") 224 active = lambda name: False 225 elif kernel.dim == '1d': 226 active = lambda name: name in set(kernel.info['par_type']['1d']) 227 elif kernel.dim == '2d': 228 active = lambda name: name in set(kernel.info['par_type']['2d']) 229 else: 230 active = lambda name: True 231 232 vw_pairs = [(get_weights(p, pars) if active(p.name) 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 -
sasmodels/generate.py
r1edf610 rafda63c 684 684 685 685 def poly_details(model_info, weights): 686 print("entering poly",weights)687 686 pars = model_info['parameters'][2:] # skip scale and background 688 687 max_pd = model_info['max_pd'] … … 707 706 if theta_par >= 0 and pd_length[theta_par] <= 1: 708 707 theta_par = -1 709 710 print("p","max_pd","constants_offset",par_offset,max_pd,constants_offset,npars)711 print(idx)712 print(pd_length[idx])713 print(pd_offset[idx])714 print(pd_stride)715 print(pd_isvol[idx])716 708 717 709 details = np.empty(constants_offset + 2, 'int32') … … 727 719 for k,parameter_num in enumerate(idx): 728 720 details[coord_offset+parameter_num] = 2**k 729 details[constants_offset] 721 details[constants_offset] = 1 # fast_coord_count: one fast index 730 722 details[constants_offset+1] = theta_par 731 723 print ("details",details)
Note: See TracChangeset
for help on using the changeset viewer.