Changeset ee54fcf0 in sasview


Ignore:
Timestamp:
Apr 18, 2012 4:34:21 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
b1432b9
Parents:
6184b4e
Message:

improved error msg in details dialog

Location:
invariantview/src/sans/perspectives/invariant
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • invariantview/src/sans/perspectives/invariant/invariant_details.py

    ra3efdeb ree54fcf0  
    101101            except: 
    102102                self.qstar_high_percent = 'error' 
    103         self.check_values() 
     103        wx.CallAfter(self.check_values) 
    104104    
    105105    def check_values(self): 
     
    119119        msg = '' 
    120120        if self.qstar_percent == 'error': 
    121             self.existing_warning = True 
    122             msg = 'Error occurred when computing invariant from data.\n ' 
     121            try: 
     122                float(self.qstar) 
     123            except: 
     124                self.existing_warning = True 
     125                msg += 'Error occurred when computing invariant from data.\n ' 
    123126        if self.qstar_percent > 1: 
    124127            self.existing_warning = True 
     
    126129            msg += "than 100% .\n" 
    127130        if self.qstar_low_percent == 'error': 
    128             self.existing_warning = True 
    129             msg = "Error occurred when computing extrapolated invariant" 
    130             msg += " at low-Q region.\n" 
     131            try: 
     132                float(self.qstar_low) 
     133            except: 
     134                self.existing_warning = True 
     135                msg += "Error occurred when computing extrapolated invariant" 
     136                msg += " at low-Q region.\n" 
    131137        elif self.qstar_low_percent is not None : 
    132138            if self.qstar_low_percent >= 0.05: 
     
    142148                msg += "than 100% .\n" 
    143149        if self.qstar_high_percent == 'error': 
    144             self.existing_warning = True 
    145             msg += 'Error occurred when computing extrapolated' 
    146             msg += ' invariant at high-Q region.\n' 
     150            try: 
     151                float(self.qstar_high) 
     152            except: 
     153                self.existing_warning = True 
     154                msg += 'Error occurred when computing extrapolated' 
     155                msg += ' invariant at high-Q region.\n' 
    147156        elif self.qstar_high_percent is not None: 
    148157            if self.qstar_high_percent >= 0.05: 
  • invariantview/src/sans/perspectives/invariant/invariant_panel.py

    rf6518f8 ree54fcf0  
    599599                                                  type="stop")) 
    600600            return 
    601         
     601        self.Show(False) 
    602602        #Compute qstar extrapolated to low q range  
    603603        self.get_low_qstar(inv=inv, npts_low=npts_low, low_q=low_q) 
     
    654654            wx.PostEvent(self.parent, 
    655655                StatusEvent(status='\nFinished invariant computation...')) 
     656        self.Show(True) 
     657        self.Refresh() 
    656658             
    657659    def on_undo(self,event=None): 
Note: See TracChangeset for help on using the changeset viewer.