Changeset 70bf68c in sasview
- Timestamp:
- Jul 13, 2009 11:25:26 AM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 077809c
- Parents:
- 770e4c9
- Location:
- park_integration
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
r4331b05e r70bf68c 324 324 self.qmin = 1e-16 325 325 self.qmax = math.sqrt(x*x +y*y) 326 326 ## new error image for fitting purpose 327 if self.err_image== None or self.err_image ==[]: 328 self.res_err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 329 else: 330 self.res_err_image = copy.deepcopy(self.err_image) 331 self.res_err_image[self.err_image==0]=1 327 332 328 333 … … 349 354 """ 350 355 res=[] 351 if self.err_image== None or self.err_image ==[]: 352 err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 353 else: 354 err_image = copy.deepcopy(self.err_image) 355 356 err_image[err_image==0]=1 356 357 357 for i in range(len(self.x_bins)): 358 358 for j in range(len(self.y_bins)): … … 361 361 if self.qmin <= radius and radius <= self.qmax: 362 362 res.append( (self.image[j][i]- fn([self.x_bins[i],self.y_bins[j]]))\ 363 / err_image[j][i] )363 /self.res_err_image[j][i] ) 364 364 365 365 return numpy.array(res) … … 380 380 381 381 382 class sansAssembly:382 class SansAssembly: 383 383 """ 384 384 Sans Assembly class a class wrapper to be call in optimizer.leastsq method -
park_integration/ScipyFitting.py
r6963aa3 r70bf68c 83 83 84 84 try: 85 functor= sansAssembly(self.paramList,model,data, curr_thread= self.curr_thread)85 functor= SansAssembly(self.paramList,model,data, curr_thread= self.curr_thread) 86 86 out, cov_x, info, mesg, success = optimize.leastsq(functor,model.getParams(self.paramList), full_output=1, warning=True) 87 87
Note: See TracChangeset
for help on using the changeset viewer.