Changeset 80c2c85 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Jun 28, 2016 5:10:33 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
3aa2f3c
Parents:
899e084 (diff), 5552396 (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.
Message:

Merge branch 'master' into sasview-cleanup

Location:
src/sas/sasgui/perspectives/fitting
Files:
2 edited

Legend:

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

    r7673ecd r6ed67db  
    202202        self.state_change = False 
    203203        ## save customized array 
    204         self.values = [] 
    205         self.weights = [] 
     204        self.values = {}   # type: Dict[str, List[float, ...]] 
     205        self.weights = {}   # type: Dict[str, List[float, ...]] 
    206206        ## retrieve saved state 
    207207        self.number_saved_state = 0 
     
    25882588            self._draw_model() 
    25892589            self.Refresh() 
    2590         except: 
     2590        except Exception: 
     2591            logging.error(traceback.format_exc()) 
    25912592            # Error msg 
    25922593            msg = "Error occurred:" 
     
    26802681        # Try to delete values and weight of the names array dic if exists 
    26812682        try: 
    2682             del self.values[name] 
    2683             del self.weights[name] 
    2684             # delete all other dic 
    2685             del self.state.values[name] 
    2686             del self.state.weights[name] 
    2687             del self.model._persistency_dict[name.split('.')[0]] 
    2688             del self.state.model._persistency_dict[name.split('.')[0]] 
     2683            if name in self.values: 
     2684                del self.values[name] 
     2685                del self.weights[name] 
     2686                # delete all other dic 
     2687                del self.state.values[name] 
     2688                del self.state.weights[name] 
     2689                del self.model._persistency_dict[name.split('.')[0]] 
     2690                del self.state.model._persistency_dict[name.split('.')[0]] 
    26892691        except Exception: 
    26902692            logging.error(traceback.format_exc()) 
  • src/sas/sasgui/perspectives/fitting/models.py

    r7673ecd refe730d  
    1212import py_compile 
    1313import shutil 
     14from sasmodels.sasview_model import load_custom_model, load_standard_models 
    1415# Explicitly import from the pluginmodel module so that py2exe 
    1516# places it in the distribution. The Model1DPlugin class is used 
    1617# as the base class of plug-in models. 
     18from sas.sasgui import get_user_dir 
    1719from sas.sascalc.fit.pluginmodel import Model1DPlugin 
    1820from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 
    19 from sasmodels.sasview_model import load_custom_model, load_standard_models 
    2021 
    2122 
    2223PLUGIN_DIR = 'plugin_models' 
    23 PLUGIN_LOG = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR, 
    24                           "plugins.log") 
     24PLUGIN_LOG = os.path.join(get_user_dir(), PLUGIN_DIR, "plugins.log") 
    2525 
    2626def get_model_python_path(): 
Note: See TracChangeset for help on using the changeset viewer.