Changeset a9e1739 in sasview
- Timestamp:
- Jun 14, 2012 11:27:24 AM (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:
- 965264a
- Parents:
- 483c4cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/dataFitting.py
r483c4cf ra9e1739 371 371 372 372 """ 373 length = numpy.size(self.data)374 if length < 1:375 length = numpy.size(other.data)376 print "numpy.size(self.data)=", numpy.size(self.data)377 373 # First, check the data compatibility 378 374 dy, dy_other = self._validity_check(other) … … 380 376 q_data=None, err_image=None, xmin=None, xmax=None, 381 377 ymin=None, ymax=None, zmin=None, zmax=None) 382 result.clone_without_data(length ,self)378 result.clone_without_data(length=numpy.size(self.data), clone=self) 383 379 result.copy_from_datainfo(data2d=self) 380 result.data = self.data 381 result.qx_data = self.qx_data 382 result.qy_data = self.qy_data 383 result.q_data = self.q_data 384 result.mask = self.mask 384 385 result.xmin = self.xmin 385 386 result.xmax = self.xmax 386 387 result.ymin = self.ymin 387 388 result.ymax = self.ymax 389 390 if self.err_data is not None: 391 result.err_data = self.err_data 392 if self.dqx_data is not None: 393 result.dqx_data = self.dqx_data 394 if self.dqy_data is not None: 395 result.dqy_data = self.dqy_data 388 396 if self.dqx_data == None or self.dqy_data == None: 389 397 result.dqx_data = None 390 398 result.dqy_data = None 391 399 else: 392 result.dqx_data = numpy.zeros(len(self.data)) 393 result.dqy_data = numpy.zeros(len(self.data)) 394 395 result.qx_data = self.qx_data 396 result.qy_data = self.qy_data 397 result.q_data = self.q_data 398 result.mask = self.mask 400 result.dqx_data = numpy.zeros(numpy.size(self.data)) 401 result.dqy_data = numpy.zeros(numpy.size(self.data)) 402 399 403 for i in range(numpy.size(self.data)): 400 result.data[i] = self.data[i]401 if self.err_data is not None and \402 numpy.size(self.data) == numpy.size(self.err_data):403 result.err_data[i] = self.err_data[i]404 if self.dqx_data is not None:405 result.dqx_data[i] = self.dqx_data[i]406 if self.dqy_data is not None:407 result.dqy_data[i] = self.dqy_data[i]408 409 404 a = Uncertainty(self.data[i], dy[i]**2) 410 405 if isinstance(other, Data2D): … … 428 423 result.data[i] = output.x 429 424 result.err_data[i] = math.sqrt(math.fabs(output.variance)) 425 430 426 return result 431 427
Note: See TracChangeset
for help on using the changeset viewer.