Changeset c1bffa5 in sasview


Ignore:
Timestamp:
Mar 23, 2015 1:28:37 PM (10 years ago)
Author:
Doucet, Mathieu <doucetm@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
701a155, 9dea723
Parents:
bf6b8d1
Message:

This should fix the suggested value buttons.

Location:
src/sas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/pr/inversion_panel.py

    r8b21fa7 rc1bffa5  
    696696        try: 
    697697            alpha = self.alpha_estimate_ctl.GetLabel() 
    698             self.alpha_ctl.SetValue(float(alpha)) 
     698            # Check that we have a number 
     699            float(alpha) 
     700            self.alpha_ctl.SetValue(alpha) 
     701        except ValueError: 
     702            logging.error("InversionControl._on_accept_alpha got a value that was not a number: %s" % alpha ) 
    699703        except: 
    700704            # No estimate or bad estimate, either do nothing 
     
    708712        try: 
    709713            nterms = self.nterms_estimate_ctl.GetLabel() 
    710             self.nfunc_ctl.SetValue(float(nterms)) 
     714            # Check that we have a number 
     715            float(nterms) 
     716            self.nfunc_ctl.SetValue(nterms) 
     717        except ValueError: 
     718            logging.error("InversionControl._on_accept_nterms got a value that was not a number: %s" % nterms ) 
    711719        except: 
    712720            # No estimate or bad estimate, either do nothing 
  • src/sas/pr/num_term.py

    rbf6b8d1 rc1bffa5  
    144144            return nt, self.alpha_list[nt - 10], self.mess_list[nt - 10] 
    145145        except: 
    146             logging.error("NTermEstimator.num_terms: %s" % sys.exc_value) 
     146            #TODO: check the logic above and make sure it doesn't  
     147            # rely on the try-except. 
    147148            return self.nterm_min, self.invertor.alpha, '' 
    148149 
Note: See TracChangeset for help on using the changeset viewer.