Changeset 9ce69ec in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Sep 18, 2018 3:51:44 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- fc5d2d7f
- Parents:
- 1738173
- git-author:
- Piotr Rozyczko <rozyczko@…> (09/18/18 03:42:03)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/18/18 03:51:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r305114c r9ce69ec 1849 1849 # Show the chart if ready 1850 1850 data_to_show = self.data if self.data_is_loaded else self.model_data 1851 if data_to_show is not None: 1852 self.communicate.plotRequestedSignal.emit([data_to_show], self.tab_id) 1851 # Any models for this page 1852 current_index = self.all_data[self.data_index] 1853 plots = GuiUtils.plotsFromFilename(self.data.filename, current_index.model()) 1854 fitpage_name = "" if id is None else "M"+str(self.tab_id) 1855 # Has the fitted data been shown? 1856 data_shown = False 1857 #for plot in plots: 1858 for item, plot in plots.items(): 1859 if fitpage_name in plot.name: 1860 data_shown = True 1861 self.communicate.plotRequestedSignal.emit([item, plot], self.tab_id) 1862 if not data_shown: 1863 # fit+data has not been shown - show just data 1864 self.communicate.plotRequestedSignal.emit([item, data_to_show], self.tab_id) 1853 1865 1854 1866 def onOptionsUpdate(self): … … 2080 2092 self.kernel_module = self.models[model_name]() 2081 2093 2094 # Change the model name to a monicker 2095 self.kernel_module.name = self.modelName() 2096 2082 2097 # Explicitly add scale and background with default values 2083 2098 temp_undo_state = self.undo_supported … … 2112 2127 # Structure factor is the only selected model; build it and show all its params 2113 2128 self.kernel_module = self.models[structure_factor]() 2129 self.kernel_module.name = self.modelName() 2114 2130 s_params = self.kernel_module._model_info.parameters 2115 2131 s_params_orig = s_params … … 2122 2138 2123 2139 self.kernel_module = MultiplicationModel(p_kernel, s_kernel) 2140 # Modify the name to correspond to shown items 2141 self.kernel_module.name = self.modelName() 2124 2142 all_params = self.kernel_module._model_info.parameters.kernel_parameters 2125 2143 all_param_names = [param.name for param in all_params] … … 2427 2445 # Bring the GUI to normal state 2428 2446 self.enableInteractiveElements() 2429 2447 if return_data is None: 2448 self.calculateDataFailed("Results not available.") 2449 return 2430 2450 fitted_data = self.logic.new1DPlot(return_data, self.tab_id) 2431 2451 residuals = self.calculateResiduals(fitted_data)
Note: See TracChangeset
for help on using the changeset viewer.