Changeset eb4f2fd in sasview for fittingview/src/sans
- Timestamp:
- Oct 5, 2011 4:13:00 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:
- dcc93e4
- Parents:
- d91d2c9
- Location:
- fittingview/src/sans/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitproblem.py
r41661a0 reb4f2fd 580 580 self.theory_data = copy.deepcopy(data) 581 581 582 583 584 582 def get_theory_data(self): 585 583 """ -
fittingview/src/sans/perspectives/fitting/fitting.py
r41661a0 reb4f2fd 1060 1060 batch_inputs["error on %s" % pars[index]] = [] 1061 1061 for res in result: 1062 model, data = res.inputs[0] 1063 temp_model = model.clone() 1062 1064 if res is None: 1063 1065 null_value = numpy.nan … … 1072 1074 item = null_value 1073 1075 batch_inputs["error on %s" % pars[index]].append(item) 1076 """ 1077 if pars[index] in model.getParamList(): 1078 model.setParam(pars[index], res.pvec[index]) 1079 """ 1074 1080 else: 1075 1081 from sans.guiframe.data_processor import BatchCell … … 1082 1088 item = res.stderr[index] 1083 1089 batch_inputs["error on %s" % pars[index]].append(item) 1084 1085 1090 if pars[index] in temp_model.getParamList(): 1091 temp_model.setParam(pars[index], res.pvec[index]) 1092 1086 1093 self.page_finder[pid].set_batch_result(batch_inputs=batch_inputs, 1087 1094 batch_outputs=batch_outputs) 1088 1095 cpage = self.fit_panel.get_page_by_id(pid) 1089 1096 cpage._on_fit_complete() 1090 model, data = res.inputs[0]1091 1097 self.page_finder[pid][data.id].set_result(res) 1092 1098 fitproblem = self.page_finder[pid][data.id] 1093 smearer = fitproblem.get_smearer() 1099 1100 1101 from sans.models.qsmearing import smear_selection 1102 #smearer = fitproblem.get_smearer() 1103 smearer = smear_selection(data, temp_model) 1094 1104 qmin, qmax = fitproblem.get_range() 1095 1105 weight = fitproblem.get_weight() 1096 1106 flag = issubclass(data.__class__, Data2D) 1097 self.draw_model(model= model,1107 self.draw_model(model=temp_model, 1098 1108 page_id=pid, 1099 1109 data=data, … … 1131 1141 theory_data.name = data.name + "[%s]" % str(model.__class__.__name__) 1132 1142 cell.object = [data, theory_data] 1133 1134 1143 batch_outputs["Data"].append(cell) 1135 1144 for key, value in data.meta_data.iteritems(): … … 1449 1458 current_pg = self.fit_panel.get_page_by_id(page_id) 1450 1459 title = new_plot.title 1451 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 1460 batch_on = self.fit_panel.get_page_by_id(page_id).batch_on 1461 if not batch_on: 1462 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 1452 1463 title=str(title))) 1453 1464 caption = current_pg.window_caption 1454 1465 self.page_finder[page_id].set_fit_tab_caption(caption=caption) 1466 1455 1467 self.page_finder[page_id].set_theory_data(data=new_plot, 1456 1468 fid=data.id) … … 1680 1692 dy[dy==0] = 1 1681 1693 fn = data_copy.y[index] 1694 1682 1695 theory_data = self.page_finder[page_id].get_theory_data(fid=data_copy.id) 1683 1696 if theory_data== None: … … 1691 1704 # get chisqr only w/finite 1692 1705 chisqr = numpy.average(residuals * residuals) 1706 1693 1707 self._plot_residuals(page_id=page_id, data=data_copy, 1694 1708 fid=fid, … … 1809 1823 event = BatchDrawEvent(page_id=page_id , 1810 1824 batch_on=batch_on, 1825 fid=fid, 1811 1826 batch_outputs=batch_outputs, 1812 1827 batch_inputs=batch_inputs, … … 1820 1835 deplay batch result 1821 1836 """ 1837 fid = event.fid 1822 1838 page_id = event.page_id 1823 1839 batch_on = event.batch_on … … 1825 1841 batch_outputs = event.batch_outputs 1826 1842 batch_inputs = event.batch_inputs 1827 if flag and batch_on :1843 if flag and batch_on and fid is not None: 1828 1844 self.parent.on_set_batch_result(data_outputs=batch_outputs, 1829 1845 data_inputs=batch_inputs,
Note: See TracChangeset
for help on using the changeset viewer.