Changeset f5e2a10a in sasview for src/sas


Ignore:
Timestamp:
Mar 26, 2019 6:53:47 AM (6 years ago)
Author:
ibressler
Branches:
ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
Children:
bad4a52
Parents:
14e1ff0
Message:

show a polydispersity plot for 2D data as well

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
2 edited

Legend:

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

    rb38c8c8 rf5e2a10a  
    590590        xunit = model.details[name][0] 
    591591        data1d.xaxis(r'\rm{{{}}}'.format(name.replace('_', '\_')), xunit) 
    592         data1d.yaxis(r'\rm{weight}', 'normalized') 
     592        data1d.yaxis(r'\rm{probability}', 'normalized') 
    593593        data1d.scale = 'linear' 
    594594        data1d.symbol = 'Line' 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rd4c9242 rf5e2a10a  
    27372737        self.Calc2DFinishedSignal.emit(return_data) 
    27382738 
     2739    def _appendPlotsPolyDisp(self, new_plots, return_data, fitted_data): 
     2740        """ 
     2741        Internal helper for 1D and 2D for creating plots of the polydispersity distribution for 
     2742        parameters which have a polydispersity enabled. 
     2743        """ 
     2744        for plot in FittingUtilities.plotPolydispersities(return_data.get('model', None)): 
     2745            data_id = fitted_data.id.split() 
     2746            plot.id = "{} [{}] {}".format(data_id[0], plot.name, " ".join(data_id[1:])) 
     2747            data_name = fitted_data.name.split() 
     2748            plot.name = " ".join([data_name[0], plot.name] + data_name[1:]) 
     2749            self.createNewIndex(plot) 
     2750            new_plots.append(plot) 
     2751 
    27392752    def complete1D(self, return_data): 
    27402753        """ 
     
    27692782            self.communicate.deleteIntermediateTheoryPlotsSignal.emit(self.kernel_module.id) 
    27702783 
    2771         # Create plots for parameters with enabled polydispersity 
    2772         for plot in FittingUtilities.plotPolydispersities(return_data.get('model', None)): 
    2773             data_id = fitted_data.id.split() 
    2774             plot.id = "{} [{}] {}".format(data_id[0], plot.name, " ".join(data_id[1:])) 
    2775             data_name = fitted_data.name.split() 
    2776             plot.name = " ".join([data_name[0], plot.name] + data_name[1:]) 
    2777             self.createNewIndex(plot) 
    2778             new_plots.append(plot) 
     2784        self._appendPlotsPolyDisp(new_plots, return_data, fitted_data) 
    27792785 
    27802786        # Create plots for intermediate product data 
     
    28132819        if residuals is not None: 
    28142820            new_plots.append(residuals) 
     2821 
     2822        self._appendPlotsPolyDisp(new_plots, return_data, fitted_data) 
    28152823 
    28162824        # Update/generate plots 
Note: See TracChangeset for help on using the changeset viewer.