Changeset 15f68ce in sasview
- Timestamp:
- Oct 18, 2011 10:43:19 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:
- 74dc0a4
- Parents:
- ba7dceb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/console.py
r49c69de r15f68ce 116 116 """ 117 117 self.elapsed_time = time.time() - self.elapsed_time 118 msg = " Updating fit ...\n result:\n %s \n"%self.result. __str__()118 msg = " Updating fit ...\n result:\n %s \n"%self.result.fitness 119 119 wx.PostEvent(self.parent, StatusEvent(status=msg, info="info", 120 120 type="progress")) -
fittingview/src/sans/perspectives/fitting/fitpage.py
r4679e16 r15f68ce 2116 2116 item[2].SetValue(val_out) 2117 2117 2118 if(cov !=None ):2118 if(cov !=None and len(cov) == len(out)): 2119 2119 try: 2120 2120 if dispersity !=None: … … 2127 2127 except: 2128 2128 pass 2129 2129 2130 2130 if cov[ind]!=None : 2131 2131 if numpy.isfinite(float(cov[ind])): -
fittingview/src/sans/perspectives/fitting/fitting.py
rdafc36f r15f68ce 1121 1121 #check consistency of arrays 1122 1122 if not is_data2d: 1123 if len(res.theory) == len(res.index ) and \1123 if len(res.theory) == len(res.index[res.index]) and \ 1124 1124 len(res.index) == len(data.y): 1125 1125 correct_result = True 1126 1126 else: 1127 if len(res.theory)== len(res.index ) and \1127 if len(res.theory)== len(res.index[res.index]) and \ 1128 1128 len(res.index) == len(data.data): 1129 1129 correct_result = True … … 1176 1176 #save only fitted values 1177 1177 batch_outputs[res.param_list[index]].append(res.pvec[index]) 1178 item = res.stderr[index] 1179 batch_inputs["error on %s" % res.param_list[index]].append(item) 1178 if res.stderr is not None and len(res.stderr) == len(res.param_list): 1179 item = res.stderr[index] 1180 batch_inputs["error on %s" % res.param_list[index]].append(item) 1180 1181 if res.param_list[index] in model.getParamList(): 1181 1182 model.setParam(res.param_list[index], res.pvec[index]) … … 1305 1306 index += 1 1306 1307 cpage._on_fit_complete() 1307 if res. stderr== None:1308 if res.fitness == None: 1308 1309 msg = "Fit Abort: " 1309 1310 else: -
park_integration/src/sans/fit/ScipyFitting.py
rba7dceb r15f68ce 128 128 raise 129 129 chisqr = functor.chisq() 130 130 131 if cov_x is not None and numpy.isfinite(cov_x).all(): 131 132 stderr = numpy.sqrt(numpy.diag(cov_x)) 132 133 else: 133 stderr = None134 stderr = [] 134 135 135 136 result.index = data.idx 136 if not (numpy.isnan(out).any()) and (cov_x != None): 137 result.fitness = chisqr 138 result.stderr = stderr 139 result.pvec = out 140 result.success = success 141 result.theory = functor.theory 142 #print "scipy", result.inputs 143 if q is not None: 144 q.put(result) 145 return q 146 if success < 1 or success > 5: 147 result = None 137 result.fitness = chisqr 138 result.stderr = stderr 139 result.pvec = out 140 result.success = success 141 result.theory = functor.theory 142 if q is not None: 143 q.put(result) 144 return q 145 if success < 1 or success > 5: 146 result.fitness = None 148 147 return [result] 149 """ 150 else: 151 return None 152 """ 153 # Error will be present to the client, not here 154 #else: 155 # raise ValueError, "SVD did not converge" + str(mesg) 148 156 149 157 150 def _check_param_range(self, model):
Note: See TracChangeset
for help on using the changeset viewer.