Changeset dcf73a4 in sasview for sansguiframe
- Timestamp:
- Jun 14, 2012 1:48:28 PM (13 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:
- 72538fc
- Parents:
- 965264a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/dataFitting.py
r965264a rdcf73a4 376 376 q_data=None, err_image=None, xmin=None, xmax=None, 377 377 ymin=None, ymax=None, zmin=None, zmax=None) 378 result.clone_without_data(len gth=numpy.size(self.data))378 result.clone_without_data(len(self.data), self) 379 379 result.copy_from_datainfo(data2d=self) 380 result.data = self.data381 result.qx_data = self.qx_data382 result.qy_data = self.qy_data383 result.q_data = self.q_data384 result.mask = self.mask385 380 result.xmin = self.xmin 386 381 result.xmax = self.xmax 387 382 result.ymin = self.ymin 388 383 result.ymax = self.ymax 389 390 if self.err_data is not None:391 result.err_data = self.err_data392 if self.dqx_data is not None:393 result.dqx_data = self.dqx_data394 if self.dqy_data is not None:395 result.dqy_data = self.dqy_data396 384 if self.dqx_data == None or self.dqy_data == None: 397 385 result.dqx_data = None 398 386 result.dqy_data = None 399 387 else: 400 result.dqx_data = numpy.zeros(numpy.size(self.data)) 401 result.dqy_data = numpy.zeros(numpy.size(self.data)) 402 388 result.dqx_data = numpy.zeros(len(self.data)) 389 result.dqy_data = numpy.zeros(len(self.data)) 403 390 for i in range(numpy.size(self.data)): 391 result.data[i] = self.data[i] 392 if self.err_data is not None and \ 393 numpy.size(self.data) == numpy.size(self.err_data): 394 result.err_data[i] = self.err_data[i] 395 if self.dqx_data is not None: 396 result.dqx_data[i] = self.dqx_data[i] 397 if self.dqy_data is not None: 398 result.dqy_data[i] = self.dqy_data[i] 399 result.qx_data[i] = self.qx_data[i] 400 result.qy_data[i] = self.qy_data[i] 401 result.q_data[i] = self.q_data[i] 402 result.mask[i] = self.mask[i] 403 404 404 a = Uncertainty(self.data[i], dy[i]**2) 405 405 if isinstance(other, Data2D): … … 423 423 result.data[i] = output.x 424 424 result.err_data[i] = math.sqrt(math.fabs(output.variance)) 425 426 425 return result 427 426
Note: See TracChangeset
for help on using the changeset viewer.