Changeset f72333f in sasview for park_integration/AbstractFitEngine.py
- Timestamp:
- May 10, 2010 4:50:05 PM (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:
- 4fbc93e
- Parents:
- 2d409fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
r36bc34e rf72333f 261 261 self.qmin= None 262 262 self.qmax= None 263 self.smearer = None 263 264 self.set_data(sans_data2d ) 265 264 266 265 267 def set_data(self, sans_data2d, qmin=None, qmax=None ): … … 294 296 self.index_model = (self.index_model) & (self.mask) 295 297 self.index_model = (self.index_model) & (numpy.isfinite(self.data)) 296 298 299 def set_smearer(self,smearer): 300 """ 301 Set smearer 302 """ 303 if smearer == None: 304 return 305 self.smearer = smearer 306 self.smearer.set_index(self.index_model) 307 self.smearer.get_data() 308 297 309 def setFitRange(self,qmin=None,qmax=None): 298 310 """ to set the fit range""" … … 317 329 """ 318 330 @return the residuals 319 """ 331 """ 332 if self.smearer != None: 333 fn.set_index(self.index_model) 334 # Get necessary data from self.data and set the data for smearing 335 fn.get_data() 336 337 gn = fn.get_value() 338 else: 339 gn = fn([self.qx_data[self.index_model],self.qy_data[self.index_model]]) 320 340 # use only the data point within ROI range 321 res=(self.data[self.index_model] - fn([self.qx_data[self.index_model], 322 self.qy_data[self.index_model]]))/self.res_err_data[self.index_model] 341 res=(self.data[self.index_model] - gn)/self.res_err_data[self.index_model] 323 342 return res 324 343
Note: See TracChangeset
for help on using the changeset viewer.