Changes in src/sas/qtgui/Perspectives/Fitting/FittingLogic.py [dcabba7:40975f8] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingLogic.py
rdcabba7 r40975f8 161 161 Create a new 1D data instance based on fitting results 162 162 """ 163 164 return self._create1DPlot(tab_id, return_data['x'], return_data['y'], 165 return_data['model'], return_data['data']) 163 # Unpack return data from Calc1D 164 x, y, page_id, state, weight,\ 165 fid, toggle_mode_on, \ 166 elapsed, index, model, \ 167 data, update_chisqr, source, \ 168 unsmeared_output, unsmeared_data, unsmeared_error, \ 169 intermediate_results = return_data 170 171 return self._create1DPlot(tab_id, x, y, model, data) 166 172 167 173 def new2DPlot(self, return_data): … … 169 175 Create a new 2D data instance based on fitting results 170 176 """ 171 image = return_data['image']172 data = return_data['data']173 model = return_data['model']177 image, data, page_id, model, state, toggle_mode_on,\ 178 elapsed, index, fid, qmin, qmax, weight, \ 179 update_chisqr, source = return_data 174 180 175 181 np.nan_to_num(image) … … 177 183 new_plot.name = model.name + '2d' 178 184 new_plot.title = "Analytical model 2D " 179 new_plot.id = str( return_data['page_id']) + " " + data.name180 new_plot.group_id = str( return_data['page_id']) + " Model2D"185 new_plot.id = str(page_id) + " " + data.name 186 new_plot.group_id = str(page_id) + " Model2D" 181 187 new_plot.detector = data.detector 182 188 new_plot.source = data.source … … 212 218 (pq_plot, sq_plot). If either are unavailable, the corresponding plot is None. 213 219 """ 214 215 pq_plot = None 216 sq_plot = None 217 218 if return_data.get('pq_values', None) is not None: 219 pq_plot = self._create1DPlot(tab_id, return_data['x'], 220 return_data['pq_values'], return_data['model'], 221 return_data['data'], component="P(Q)") 222 if return_data.get('sq_values', None) is not None: 223 sq_plot = self._create1DPlot(tab_id, return_data['x'], 224 return_data['sq_values'], return_data['model'], 225 return_data['data'], component="S(Q)") 226 227 return pq_plot, sq_plot 220 # Unpack return data from Calc1D 221 x, y, page_id, state, weight, \ 222 fid, toggle_mode_on, \ 223 elapsed, index, model, \ 224 data, update_chisqr, source, \ 225 unsmeared_output, unsmeared_data, unsmeared_error, \ 226 intermediate_results = return_data 227 228 plots = [] 229 for name, result in intermediate_results.items(): 230 plots.append(self._create1DPlot(tab_id, x, result, model, data, component=name)) 231 return plots 228 232 229 233 def computeDataRange(self):
Note: See TracChangeset
for help on using the changeset viewer.