Changeset 36bc34e in sasview for park_integration
- Timestamp:
- Apr 14, 2010 12:47:55 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:
- 19403da
- Parents:
- 6318298
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
r90c9cdf r36bc34e 283 283 ## new error image for fitting purpose 284 284 if self.err_data== None or self.err_data ==[]: 285 self.res_err_data= numpy. zeros(len(self.data))285 self.res_err_data= numpy.ones(len(self.data)) 286 286 else: 287 287 self.res_err_data = copy.deepcopy(self.err_data) 288 self.res_err_data[self.res_err_data==0]= numpy.sqrt(self.data[self.res_err_data==0])288 self.res_err_data[self.res_err_data==0]=1 289 289 290 290 self.radius= numpy.sqrt(self.qx_data**2 + self.qy_data**2) … … 292 292 # Note: mask = True: for MASK while mask = False for NOT to mask 293 293 self.index_model = ((self.qmin <= self.radius)&(self.radius<= self.qmax)) 294 self.mask = (self.index_model) & (self.mask) 294 self.index_model = (self.index_model) & (self.mask) 295 self.index_model = (self.index_model) & (numpy.isfinite(self.data)) 295 296 296 297 def setFitRange(self,qmin=None,qmax=None): … … 304 305 self.radius= numpy.sqrt(self.qx_data**2 + self.qy_data**2) 305 306 self.index_model = ((self.qmin <= self.radius)&(self.radius<= self.qmax)) 306 self. mask= (self.index_model) &(self.mask)307 307 self.index_model = (self.index_model) &(self.mask) 308 self.index_model = (self.index_model) & (numpy.isfinite(self.data)) 308 309 309 310 def getFitRange(self): … … 318 319 """ 319 320 # use only the data point within ROI range 320 res=(self.data[self. mask] - fn([self.qx_data[self.mask],321 self.qy_data[self. mask]]))/self.res_err_data[self.mask]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] 322 323 return res 323 324
Note: See TracChangeset
for help on using the changeset viewer.