Changeset 47d9be79 in sasview for fittingview/src/sans
- Timestamp:
- Oct 12, 2011 11:41:47 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:
- 18253cd
- Parents:
- d8661fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitting.py
r92a5ac92 r47d9be79 1096 1096 msg += "Data %s and Model %s did not fit.\n" % (data_name, 1097 1097 model_name) 1098 print msg1098 #print msg 1099 1099 wx.PostEvent(self.parent, StatusEvent(status=msg, 1100 1100 error="error", … … 1126 1126 cell.value = res.fitness 1127 1127 batch_outputs["Chi2"].append(cell) 1128 for param in model.getParamList(): 1129 if model.is_fittable(param): 1130 for index in range(len(pars)): 1131 #replug only fitted values 1132 if param != pars[index]: 1133 batch_outputs[pars[index]].append(res.pvec[index]) 1134 item = res.stderr[index] 1135 batch_inputs["error on %s" % pars[index]].append(item) 1136 if pars[index] in model.getParamList(): 1137 model.setParam(pars[index], res.pvec[index]) 1138 else: 1139 batch_outputs[str(param)].append(model.getParam(param)) 1128 # add parameters to batch_results 1129 param_list = model.getParamList() 1130 for param in model.getDispParamList(): 1131 if not model.is_fittable(param) and \ 1132 param in param_list: 1133 param_list.remove(param) 1134 for param in param_list: 1135 # save value of fixed parameters 1136 if param not in batch_outputs.keys(): 1137 batch_outputs[param] = [] 1138 if param not in pars: 1139 batch_outputs[str(param)].append(model.getParam(param)) 1140 for index in range(len(pars)): 1141 #save only fitted values 1142 batch_outputs[pars[index]].append(res.pvec[index]) 1143 item = res.stderr[index] 1144 batch_inputs["error on %s" % pars[index]].append(item) 1145 if pars[index] in model.getParamList(): 1146 model.setParam(pars[index], res.pvec[index]) 1140 1147 1141 1148 self.page_finder[pid].set_batch_result(batch_inputs=batch_inputs, … … 1149 1156 flag = issubclass(data.__class__, Data2D) 1150 1157 if not flag: 1158 #print "Batch complete", len(res.theory), len(res.index) 1151 1159 self._complete1D(x=data.x, y=res.theory, page_id=pid, 1152 1160 elapsed=None,
Note: See TracChangeset
for help on using the changeset viewer.