Changeset 54c21f50 in sasview for park_integration
- Timestamp:
- Apr 16, 2009 2:23:52 PM (16 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:
- a8088d7
- Parents:
- 3370922
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/AbstractFitEngine.py
rfff74cb r54c21f50 1 1 2 import park,numpy,math 2 import park,numpy,math, copy 3 3 4 4 class SansParameter(park.Parameter): … … 244 244 dy= numpy.zeros(len(y)) 245 245 else: 246 dy= numpy.asarray(self.dy) 246 dy= copy.deepcopy(self.dy) 247 dy= numpy.asarray(dy) 247 248 dy[dy==0]=1 248 249 idx = (x>=self.qmin) & (x <= self.qmax) … … 316 317 res=[] 317 318 if self.err_image== None or self.err_image ==[]: 318 self.err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 319 self.err_image[self.err_image==0]=1 320 319 err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 320 else: 321 err_image = copy.deepcopy(self.err_image) 322 323 err_image[err_image==0]=1 321 324 for i in range(len(self.x_bins)): 322 325 for j in range(len(self.y_bins)): … … 325 328 if self.qmin <= radius and radius <= self.qmax: 326 329 res.append( (self.image[j][i]- fn([self.x_bins[i],self.y_bins[j]]))\ 327 / self.err_image[j][i] )330 /err_image[j][i] ) 328 331 329 332 return numpy.array(res)
Note: See TracChangeset
for help on using the changeset viewer.