Changeset 3ab116f in sasview for park_integration
- Timestamp:
- Feb 9, 2011 4:43:20 PM (14 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:
- cbb8bb6
- Parents:
- c83a5af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
park_integration/ScipyFitting.py
rd603001 r3ab116f 128 128 functor = SansAssembly(self.param_list, model, data, handler=handler, 129 129 fitresult=result, curr_thread= self.curr_thread) 130 out, cov_x, _, _, success = optimize.leastsq(functor,130 out, cov_x, _, mesg, success = optimize.leastsq(functor, 131 131 model.get_params(self.param_list), 132 ftol = 0.001, 132 133 full_output=1, 133 134 warning=True) 134 135 #chisqr = functor.chisq(out) 135 136 136 chisqr = functor.chisq() 137 137 if cov_x is not None and numpy.isfinite(cov_x).all(): … … 139 139 else: 140 140 stderr = None 141 if not (numpy.isnan(out).any()) or (cov_x != None): 141 142 if not (numpy.isnan(out).any()) and (cov_x != None): 142 143 result.fitness = chisqr 143 144 result.stderr = stderr 144 145 result.pvec = out 145 146 result.success = success 146 #print result147 147 if q is not None: 148 #print "went here"149 148 q.put(result) 150 #print "get q scipy fit enfine",q.get()151 149 return q 152 150 return result 153 151 else: 154 raise ValueError, "SVD did not converge" + str( success)152 raise ValueError, "SVD did not converge" + str(mesg) 155 153 156 154
Note: See TracChangeset
for help on using the changeset viewer.