Changeset 6f4a7c17 in sasview


Ignore:
Timestamp:
Feb 4, 2018 9:37:38 PM (7 years ago)
Author:
GitHub <noreply@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
baa3348
Parents:
b6f9c9f (diff), 1f4d708 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Butler <butlerpd@…> (02/04/18 21:37:38)
git-committer:
GitHub <noreply@…> (02/04/18 21:37:38)
Message:

Merge pull request #141 from SasView?/boltzmann

Fix loading of projects with the Uniform distribution

This now seems to work even with the boltzman branch of sasmodels and Paul K approved merge already. There are some bad GUI issues however when using polydisersity/orientational distributions but those need to be addressed in a separate ticket so merging this to master

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r58a8f76 r1f4d708  
    13671367            except Exception: 
    13681368                logger.error(traceback.format_exc()) 
    1369             selection = self._find_polyfunc_selection(disp_model) 
     1369            index, selection = self._find_polyfunc_selection(disp_model) 
    13701370            for list in self.fittable_param: 
    13711371                if list[1] == key and list[7] is not None: 
    1372                     list[7].SetSelection(selection) 
     1372                    list[7].SetSelection(index) 
    13731373                    # For the array disp_model, set the values and weights 
    1374                     if selection == 1: 
     1374                    if selection == 'array': 
    13751375                        disp_model.set_weights(self.values[key], 
    13761376                                               self.weights[key]) 
     
    13851385                            logger.error(traceback.format_exc()) 
    13861386            # For array, disable all fixed params 
    1387             if selection == 1: 
     1387            if selection == 'array': 
    13881388                for item in self.fixed_param: 
    13891389                    if item[1].split(".")[0] == key.split(".")[0]: 
     
    26682668    def _find_polyfunc_selection(self, disp_func=None): 
    26692669        """ 
    2670         FInd Comboox selection from disp_func 
     2670        Find Combobox selection from disp_func 
    26712671 
    26722672        :param disp_function: dispersion distr. function 
     
    26752675        if disp_func is not None: 
    26762676            try: 
    2677                 return POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 
     2677                return (list(POLYDISPERSITY_MODELS).index(disp_func.type), 
     2678                       disp_func.type) 
    26782679            except ValueError: 
    26792680                pass  # Fall through to default class 
    2680         return POLYDISPERSITY_MODELS.keys().index('gaussian') 
     2681        return (list(POLYDISPERSITY_MODELS).index('gaussian'), 'gaussian') 
    26812682 
    26822683    def on_reset_clicked(self, event): 
Note: See TracChangeset for help on using the changeset viewer.