Changeset 78ecdcc in sasview
- Timestamp:
- Dec 8, 2011 6:06:33 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:
- 6574940a
- Parents:
- 26e1001
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansinvariant/src/sans/invariant/invariant.py
re0459a0 r78ecdcc 300 300 # Uncertainty 301 301 if type(self.data.dy)==numpy.ndarray and \ 302 len(self.data.dy)==len(self.data.x): 302 len(self.data.dy)==len(self.data.x) and \ 303 numpy.all(self.data.dy>0): 303 304 sigma = self.data.dy 304 305 else: 305 306 sigma = numpy.ones(len(self.data.x)) 306 307 307 308 # Compute theory data f(x) 308 309 fx[idx] = self.data.y[idx] … … 330 331 numpy.ones(len(linearized_data.x))*b-linearized_data.y 331 332 residuals = numpy.sum(deltas*deltas/sigma2) 332 333 333 334 err = math.fabs(residuals) / numpy.sum(1.0/sigma2) 334 335 return [a, b], [0, math.sqrt(err)]
Note: See TracChangeset
for help on using the changeset viewer.