Ignore:
Timestamp:
Dec 2, 2016 4:56:54 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b61bd57
Parents:
e42c8e9d
Message:

send errors back from fitting. Fixes #820

File:
1 edited

Legend:

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

    rec72ceb r1a5d5f2  
    15211521            for uid in page_id: 
    15221522                res = result[index] 
     1523                fit_msg = res.mesg 
    15231524                if res.fitness is None or \ 
    15241525                    not numpy.isfinite(res.fitness) or \ 
    15251526                    numpy.any(res.pvec == None) or \ 
    15261527                    not numpy.all(numpy.isfinite(res.pvec)): 
    1527                     msg = "Fitting did not converge!!!" 
    1528                     evt = StatusEvent(status=msg, info="warning", type="stop") 
    1529                     wx.PostEvent(self.parent, evt) 
     1528                    fit_msg += "\nFitting did not converge!!!" 
    15301529                    wx.CallAfter(self._update_fit_button, page_id) 
    15311530                else: 
     
    15501549                        wx.CallAfter(cpage._on_fit_complete) 
    15511550                    except KeyboardInterrupt: 
    1552                         msg = "Singular point: Fitting Stoped." 
    1553                         evt = StatusEvent(status=msg, info="info", type="stop") 
    1554                         wx.PostEvent(self.parent, evt) 
     1551                        fit_msg += "\nSingular point: Fitting stopped." 
    15551552                    except: 
    1556                         msg = "Singular point: Fitting Error occurred." 
    1557                         evt = StatusEvent(status=msg, info="error", type="stop") 
    1558                         wx.PostEvent(self.parent, evt) 
     1553                        fit_msg += "\nSingular point: Fitting error occurred." 
     1554                if fit_msg: 
     1555                   evt = StatusEvent(status=fit_msg, info="warning", type="stop") 
     1556                   wx.PostEvent(self.parent, evt) 
    15591557 
    15601558        except: 
Note: See TracChangeset for help on using the changeset viewer.