Changeset b9a5f0e in sasview for src/sas/plottools
- Timestamp:
- Feb 13, 2015 4:52:52 AM (10 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:
- fd5ac0d
- Parents:
- 35ec279
- Location:
- src/sas/plottools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/plottools/fitDialog.py
r79492222 rb9a5f0e 430 430 tempdy = numpy.asarray(tempdy) 431 431 tempdy[tempdy == 0] = 1 432 chisqr, out, cov = fittings.sa nsfit(self.model,432 chisqr, out, cov = fittings.sasfit(self.model, 433 433 [self.cstA, self.cstB], 434 434 tempx, tempy, … … 439 439 tempdy = numpy.asarray(tempdy) 440 440 tempdy[tempdy == 0] = 1 441 chisqr, out, cov = fittings.sa nsfit(self.model,441 chisqr, out, cov = fittings.sasfit(self.model, 442 442 [self.cstA, self.cstB], 443 443 tempx, tempy, tempdy, -
src/sas/plottools/fittings.py
r79492222 rb9a5f0e 27 27 28 28 29 def sa nsfit(model, pars, x, y, err_y , qmin=None, qmax=None):29 def sasfit(model, pars, x, y, err_y , qmin=None, qmax=None): 30 30 """ 31 31 Fit function … … 90 90 cstB = Parameter(line, 'B', event.cstB) 91 91 y = line.run() 92 chisqr, out, cov = sa nsfit(line, [cstA, cstB], event.x, y, 0)92 chisqr, out, cov = sasfit(line, [cstA, cstB], event.x, y, 0) 93 93 # print "Output parameters:", out 94 94 print "The right answer is [70.0, 1.0]"
Note: See TracChangeset
for help on using the changeset viewer.