Changeset da58fcc in sasview
- Timestamp:
- Oct 29, 2009 11:22:25 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:
- 77f6a8b
- Parents:
- 150144d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
r150144d rda58fcc 270 270 Determine the correct x_bin and y_bin to fit 271 271 """ 272 self.err_data = sans_data2d.err_data273 272 self.x_bins_array= numpy.reshape(sans_data2d.x_bins, 274 273 [1,len(sans_data2d.x_bins)]) … … 276 275 [len(sans_data2d.y_bins),1]) 277 276 278 x_max = max(s elf.data.xmin, self.data.xmax)279 y_max = max(s elf.data.ymin, self.data.ymax)277 x_max = max(sans_data2d.xmin, sans_data2d.xmax) 278 y_max = max(sans_data2d.ymin, sans_data2d.ymax) 280 279 281 280 ## fitting range … … 283 282 self.qmax = math.sqrt(x_max*x_max +y_max*y_max) 284 283 ## new error image for fitting purpose 285 if self.err_ image== None or self.err_image==[]:286 self.res_err_ image= numpy.zeros(len(self.y_bins),len(self.x_bins))287 else: 288 self.res_err_ image = copy.deepcopy(self.err_image)289 self.res_err_ image[self.err_image==0]=1284 if self.err_data== None or self.err_data ==[]: 285 self.res_err_data= numpy.zeros(len(self.y_bins),len(self.x_bins)) 286 else: 287 self.res_err_data = copy.deepcopy(self.err_data) 288 self.res_err_data[self.res_err_data==0]=1 290 289 291 290 self.radius= numpy.sqrt(self.x_bins_array**2 + self.y_bins_array**2) … … 311 310 def residuals(self, fn): 312 311 313 res=self.index_model*(self. image- fn([self.x_bins_array,314 self.y_bins_array]))/self.res_err_ image312 res=self.index_model*(self.data - fn([self.x_bins_array, 313 self.y_bins_array]))/self.res_err_data 315 314 return res.ravel() 316 315
Note: See TracChangeset
for help on using the changeset viewer.