Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rdc71408 rb87dc1a  
    1515from PyQt5 import QtWidgets 
    1616 
    17 from sasmodels import product 
    1817from sasmodels import generate 
    1918from sasmodels import modelinfo 
    2019from sasmodels.sasview_model import load_standard_models 
     20from sasmodels.sasview_model import MultiplicationModel 
    2121from sasmodels.weights import MODELS as POLYDISPERSITY_MODELS 
    2222 
     
    19611961        structure_module = generate.load_kernel_module(structure_factor) 
    19621962        structure_parameters = modelinfo.make_parameter_table(getattr(structure_module, 'parameters', [])) 
     1963 
    19631964        structure_kernel = self.models[structure_factor]() 
    1964  
    1965         self.kernel_module._model_info = product.make_product_info(self.kernel_module._model_info, structure_kernel._model_info) 
     1965        form_kernel = self.kernel_module 
     1966 
     1967        self.kernel_module = MultiplicationModel(form_kernel, structure_kernel) 
    19661968 
    19671969        new_rows = FittingUtilities.addSimpleParametersToModel(structure_parameters, self.is2D) 
    19681970        for row in new_rows: 
    19691971            self._model_model.appendRow(row) 
     1972            # disable fitting of parameters not listed in self.kernel_module (probably radius_effective) 
     1973            if row[0].text() not in self.kernel_module.params.keys(): 
     1974                row_num = self._model_model.rowCount() - 1 
     1975                FittingUtilities.markParameterDisabled(self._model_model, row_num) 
     1976 
    19701977        # Update the counter used for multishell display 
    19711978        self._last_model_row = self._model_model.rowCount() 
Note: See TracChangeset for help on using the changeset viewer.