Changes in / [658dd57:edba324] in sasview


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

Legend:

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

    ra1b8fee ra1b8fee  
    17351735        """ 
    17361736        try: 
     1737            number_finite = np.count_nonzero(np.isfinite(y)) 
     1738            if not number_finite: 
     1739                logger.error("Using the present parameters the model does not return any finite value. ") 
     1740                wx.PostEvent(self.parent, StatusEvent(status = "Computing Error: %s" %  
     1741                    str("Model did not return any finite value."), info="error")) 
     1742                return 
    17371743            np.nan_to_num(y) 
    17381744            new_plot = self.create_theory_1D(x, y, page_id, model, data, state, 
     
    17911797                                         index=index, weight=weight) 
    17921798 
    1793             msg = "Computation  completed!" 
     1799            msg = "Computation completed!" 
     1800            if number_finite != y.size: 
     1801                msg += ' PROBLEM: For some Q values the model returns non finite intensities!' 
     1802                logger.error("For some Q values the model returns non finite intensities.") 
     1803             
    17941804            wx.PostEvent(self.parent, StatusEvent(status=msg, type="stop")) 
     1805             
    17951806        except: 
    17961807            raise 
     
    18191830        that can be plot. 
    18201831        """ 
     1832        number_finite = np.count_nonzero(np.isfinite(image)) 
     1833        if not number_finite: 
     1834            logger.error("Using the present parameters the model does not return any finite value. ") 
     1835            wx.PostEvent(self.parent, StatusEvent(status = "Computing Error: %s" %  
     1836                str("Model did not return any finite value."), info="error")) 
     1837            return 
    18211838        np.nan_to_num(image) 
    18221839        new_plot = Data2D(image=image, err_image=data.err_data) 
     
    18781895                                      index=index, weight=weight) 
    18791896        msg = "Computation  completed!" 
     1897        if number_finite != image.size: 
     1898            msg += ' PROBLEM: For some Qx,Qy values the model returns non finite intensities!' 
     1899            logger.error("For some Qx,Qy values the model returns non finite intensities.") 
    18801900        wx.PostEvent(self.parent, StatusEvent(status=msg, type="stop")) 
    18811901 
  • src/sas/sasgui/perspectives/fitting/models.py

    ra1b8fee ra1b8fee  
    156156    try: 
    157157        import compileall 
    158         compileall.compile_dir(dir=dir, ddir=dir, force=1, 
     158        compileall.compile_dir(dir=dir, ddir=dir, force=0, 
    159159                               quiet=report_problem) 
    160160    except: 
Note: See TracChangeset for help on using the changeset viewer.