Changeset f54fb70 in sasmodels
- Timestamp:
- Aug 30, 2016 12:10:18 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:
- 51241113
- Parents:
- 14a15a3 (diff), b2377b0 (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:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/__init__.py
r40a87fa rb2377b0 14 14 defining new models. 15 15 """ 16 __version__ = "0.9 "16 __version__ = "0.93" 17 17 18 18 def data_files(): -
sasmodels/kernelcl.py
r0dc34c3 r14a15a3 568 568 if v is not None: v.release() 569 569 570 scale = values[0]/self.result[self.q_input.nq] 570 pd_norm = self.result[self.q_input.nq] 571 scale = values[0]/(pd_norm if pd_norm!=0.0 else 1.0) 571 572 background = values[1] 572 #print("scale",scale,values[0],self.result[self.q_input.nq] )573 #print("scale",scale,values[0],self.result[self.q_input.nq],background) 573 574 return scale*self.result[:self.q_input.nq] + background 574 575 # return self.result[:self.q_input.nq] -
sasmodels/kerneldll.py
r0dc34c3 r14a15a3 389 389 390 390 #print("returned",self.q_input.q, self.result) 391 scale = values[0]/self.result[self.q_input.nq] 391 pd_norm = self.result[self.q_input.nq] 392 scale = values[0]/(pd_norm if pd_norm!=0.0 else 1.0) 392 393 background = values[1] 393 394 #print("scale",scale,background) -
sasmodels/kernelpy.py
rbde38b5 r14a15a3 187 187 n_pars = len(parameters) 188 188 parameters[:] = values[2:n_pars+2] 189 scale, background = values[0], values[1]190 189 if call_details.num_active == 0: 191 norm = float(form_volume()) 192 if norm > 0.0: 193 return (scale/norm)*form() + background 194 else: 195 return np.ones(nq, 'd')*background 190 pd_norm = float(form_volume()) 191 scale = values[0]/(pd_norm if pd_norm != 0.0 else 1.0) 192 background = values[1] 193 return scale*form() + background 196 194 197 195 pd_value = values[2+n_pars:2+n_pars + call_details.num_weights] … … 245 243 pd_norm += weight * form_volume() 246 244 247 if pd_norm > 0.0: 248 return (scale/pd_norm)*total + background 249 else: 250 return np.ones(nq, 'd')*background 245 scale = values[0]/(pd_norm if pd_norm != 0.0 else 1.0) 246 background = values[1] 247 return scale*total + background 251 248 252 249
Note: See TracChangeset
for help on using the changeset viewer.