Changes in / [f54fb70:b2377b0] in sasmodels
- Location:
- sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
r14a15a3 r0dc34c3 568 568 if v is not None: v.release() 569 569 570 pd_norm = self.result[self.q_input.nq] 571 scale = values[0]/(pd_norm if pd_norm!=0.0 else 1.0) 570 scale = values[0]/self.result[self.q_input.nq] 572 571 background = values[1] 573 #print("scale",scale,values[0],self.result[self.q_input.nq] ,background)572 #print("scale",scale,values[0],self.result[self.q_input.nq]) 574 573 return scale*self.result[:self.q_input.nq] + background 575 574 # return self.result[:self.q_input.nq] -
sasmodels/kerneldll.py
r14a15a3 r0dc34c3 389 389 390 390 #print("returned",self.q_input.q, self.result) 391 pd_norm = self.result[self.q_input.nq] 392 scale = values[0]/(pd_norm if pd_norm!=0.0 else 1.0) 391 scale = values[0]/self.result[self.q_input.nq] 393 392 background = values[1] 394 393 #print("scale",scale,background) -
sasmodels/kernelpy.py
r14a15a3 rbde38b5 187 187 n_pars = len(parameters) 188 188 parameters[:] = values[2:n_pars+2] 189 scale, background = values[0], values[1] 189 190 if call_details.num_active == 0: 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 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 194 196 195 197 pd_value = values[2+n_pars:2+n_pars + call_details.num_weights] … … 243 245 pd_norm += weight * form_volume() 244 246 245 scale = values[0]/(pd_norm if pd_norm != 0.0 else 1.0) 246 background = values[1] 247 return scale*total + background 247 if pd_norm > 0.0: 248 return (scale/pd_norm)*total + background 249 else: 250 return np.ones(nq, 'd')*background 248 251 249 252
Note: See TracChangeset
for help on using the changeset viewer.