Changeset 5231948 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Dec 5, 2016 12:41:14 PM (8 years ago)
Author:
GitHub <noreply@…>
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:
9300bfa, b61bd57
Parents:
e42c8e9d (diff), 1a5d5f2 (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:
Jeff Krzywon <krzywon@…> (12/05/16 12:41:14)
git-committer:
GitHub <noreply@…> (12/05/16 12:41:14)
Message:

Merge pull request #20 from SasView?/ticket-820

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.