Ignore:
File:
1 edited

Legend:

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

    r1a8e13f0 r4c5098c  
    225225 
    226226        self.id_edit = wx.NewId() 
    227         editmodel_help = "Edit customized model sample file" 
    228227        self.menu1.AppendMenu(self.id_edit, "Plugin Model Operations", 
    229                               self.edit_model_menu, editmodel_help) 
     228                              self.edit_model_menu) 
    230229        #create  menubar items 
    231230        return [(self.menu1, self.sub_menu)] 
     
    260259            self.update_custom_combo() 
    261260            if os.path.isfile(p_path): 
    262                 msg = "Sorry! Could not be able to delete the default " 
    263                 msg += "custom model... \n" 
     261                msg = "Sorry! unable to delete the default " 
     262                msg += "plugin model... \n" 
    264263                msg += "Please manually remove the files (.py, .pyc) " 
    265264                msg += "in the 'plugin_models' folder \n" 
     
    274273                    if item.GetLabel() == label: 
    275274                        self.edit_menu.DeleteItem(item) 
    276                         msg = "The custom model, %s, has been deleted." % label 
     275                        msg = "The plugin model, %s, has been deleted." % label 
    277276                        evt = StatusEvent(status=msg, type='stop', info='info') 
    278277                        wx.PostEvent(self.parent, evt) 
     
    331330            temp = self.fit_panel.reset_pmodel_list() 
    332331            if temp: 
    333                 # Set the new custom model list for all fit pages 
     332                # Set the new plugin model list for all fit pages 
    334333                for uid, page in self.fit_panel.opened_pages.iteritems(): 
    335334                    if hasattr(page, "formfactorbox"): 
     
    876875                enable1D=enable1D, enable2D=enable2D, 
    877876                qmin=qmin, qmax=qmax, weight=weight) 
     877 
     878    def _mac_sleep(self, sec=0.2): 
     879        """ 
     880        Give sleep to MAC 
     881        """ 
     882        if ON_MAC: 
     883            time.sleep(sec) 
    878884 
    879885    def draw_model(self, model, page_id, data=None, smearer=None, 
     
    10241030                                manager=self, 
    10251031                                improvement_delta=0.1) 
     1032        self._mac_sleep(0.2) 
    10261033 
    10271034        # batch fit 
     
    12631270        :param elapsed: time spent at the fitting level 
    12641271        """ 
     1272        self._mac_sleep(0.2) 
    12651273        uid = page_id[0] 
    12661274        if uid in self.fit_thread_list.keys(): 
     
    15121520            page_id = [] 
    15131521        ## fit more than 1 model at the same time 
     1522        self._mac_sleep(0.2) 
    15141523        try: 
    15151524            index = 0 
     
    17461755                                          data_id="Data  " + data.name + " unsmeared", 
    17471756                                          dy=unsmeared_error) 
    1748                  
    1749             if sq_model is not None and pq_model is not None: 
    1750                 self.create_theory_1D(x, sq_model, page_id, model, data, state, 
    1751                                       data_description=model.name + " S(q)", 
    1752                                       data_id=str(page_id) + " " + data.name + " S(q)") 
    1753                 self.create_theory_1D(x, pq_model, page_id, model, data, state, 
    1754                                       data_description=model.name + " P(q)", 
    1755                                       data_id=str(page_id) + " " + data.name + " P(q)") 
    1756  
     1757            # Comment this out until we can get P*S models with correctly populated parameters 
     1758            #if sq_model is not None and pq_model is not None: 
     1759            #    self.create_theory_1D(x, sq_model, page_id, model, data, state, 
     1760            #                          data_description=model.name + " S(q)", 
     1761            #                          data_id=str(page_id) + " " + data.name + " S(q)") 
     1762            #    self.create_theory_1D(x, pq_model, page_id, model, data, state, 
     1763            #                          data_description=model.name + " P(q)", 
     1764            #                          data_id=str(page_id) + " " + data.name + " P(q)") 
    17571765 
    17581766            current_pg = self.fit_panel.get_page_by_id(page_id) 
     
    19551963                ## then kill itself but cannot.  Paul Kienzle came up with 
    19561964                ## this fix to prevent threads from stepping on each other 
    1957                 ## which was causing a simple custom model to crash Sasview. 
     1965                ## which was causing a simple custom plugin model to crash 
     1966                ##Sasview. 
    19581967                ## We still don't know why the fit sometimes lauched a second 
    19591968                ## thread -- something which should also be investigated. 
Note: See TracChangeset for help on using the changeset viewer.