Changeset 25e3fc9 in sasview for sansview


Ignore:
Timestamp:
Jan 26, 2010 5:46:22 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
e84e1e6
Parents:
fcd8887d
Message:

remove raise and pritn statement

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fit_thread.py

    r662da312 r25e3fc9  
    155155        except : 
    156156            #Stop on exception during fitting. Todo: need to put some mssg and reset progress bar. 
    157             #msg= " Fit Error occurred... %s"%sys.exc_value 
    158             #wx.PostEvent(self.parent, StatusEvent(status= msg,type="stop")) 
    159             raise 
     157            msg= " Fit Error occurred... %s"%sys.exc_value 
     158            wx.PostEvent(self.parent, StatusEvent(status= msg,type="stop")) 
     159             
    160160     
  • sansview/perspectives/fitting/fitting.py

    r9237df4 r25e3fc9  
    459459                    self.current_pg= page 
    460460            except: 
    461                 raise 
    462                 #msg= "%s error: %s" % (engineType,sys.exc_value) 
    463                 #wx.PostEvent(self.parent, StatusEvent(status= msg )) 
    464                 #return  
     461                msg= "%s error: %s" % (engineType,sys.exc_value) 
     462                wx.PostEvent(self.parent, StatusEvent(status= msg )) 
     463                return  
    465464             
    466465        #Do the simultaneous fit 
     
    501500            print "in pluging" 
    502501        except: 
    503             raise 
    504         #    msg= "%s error: %s" % (engineType,sys.exc_value) 
    505         #    wx.PostEvent(self.parent, StatusEvent(status= msg ,type="stop")) 
    506         #    return  
     502            msg= "%s error: %s" % (engineType,sys.exc_value) 
     503            wx.PostEvent(self.parent, StatusEvent(status= msg ,type="stop")) 
     504            return  
    507505         
    508506    def ready_fit(self, calc_fit): 
     
    641639            value.clear_model_param() 
    642640        except: 
    643             raise 
    644             #msg= title +" error: %s" % sys.exc_value 
    645             #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    646             #return 
     641            msg= title +" error: %s" % sys.exc_value 
     642            wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     643            return 
    647644        
    648645    def _onSelect(self,event): 
     
    776773            
    777774        except: 
    778             raise 
    779             #msg= "Single Fit completed but Following error occurred:%s"% sys.exc_value 
    780             #wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
    781             #return 
     775            msg= "Single Fit completed but Following error occurred:%s"% sys.exc_value 
     776            wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
     777            return 
    782778        
    783779        
     
    829825                    page.onsetValues(result.fitness, small_param_name,small_out,small_cov) 
    830826        except: 
    831             raise 
    832              #msg= "Simultaneous Fit completed" 
    833              #msg +=" but Following error occurred:%s"%sys.exc_value 
    834              #wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
    835              #return  
     827             msg= "Simultaneous Fit completed" 
     828             msg +=" but Following error occurred:%s"%sys.exc_value 
     829             wx.PostEvent(self.parent, StatusEvent(status=msg,type="stop")) 
     830             return  
    836831              
    837832                            
     
    12051200             
    12061201        except: 
    1207             raise 
    1208             #msg= " Error occurred when drawing %s Model 2D: "%model.name 
    1209             #msg+= " %s"%sys.exc_value 
    1210             #wx.PostEvent( self.parent, StatusEvent(status= msg )) 
    1211             #return   
     1202            msg= " Error occurred when drawing %s Model 2D: "%model.name 
     1203            msg+= " %s"%sys.exc_value 
     1204            wx.PostEvent( self.parent, StatusEvent(status= msg )) 
     1205            return   
    12121206    
    12131207    def _draw_model1D(self, model, data=None, smearer= None, 
  • sansview/perspectives/fitting/invariant_panel.py

    r9237df4 r25e3fc9  
    131131                check_float(self.invariant_err_ctl) 
    132132            except: 
    133                 raise 
    134                 #msg= "Error occurs for invariant: %s"%sys.exc_value 
    135                 #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    136                 #return 
     133                msg= "Error occurs for invariant: %s"%sys.exc_value 
     134                wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     135                return 
    137136            #Compute qstar extrapolated to low q range 
    138137            #Clear the previous extrapolated plot 
    139             print "low_q, high_q",low_q, high_q 
     138            #print "low_q, high_q",low_q, high_q 
    140139            if low_q: 
    141140                try:  
     
    148147                    self._plot_data(data=low_in_data, name=self.data.name+"Fitted data for low_Q") 
    149148                except: 
    150                     raise 
    151                     #msg= "Error occurs for low q invariant: %s"%sys.exc_value 
    152                     #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     149                    msg= "Error occurs for low q invariant: %s"%sys.exc_value 
     150                    wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    153151            if high_q: 
    154152                try:  
     
    161159                    self._plot_data(data=high_in_data, name=self.data.name+"Fitted data for high_Q") 
    162160                except: 
    163                     raise 
    164                     #msg= "Error occurs for high q invariant: %s"%sys.exc_value 
    165                     #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     161                    msg= "Error occurs for high q invariant: %s"%sys.exc_value 
     162                    wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    166163            try: 
    167164                qstar_total, qstar_total_err = inv.get_qstar_with_error(extrapolation) 
     
    171168                check_float(self.invariant_total_err_ctl) 
    172169            except: 
    173                 raise 
    174                 #msg= "Error occurs for total invariant: %s"%sys.exc_value 
    175                 #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     170                msg= "Error occurs for total invariant: %s"%sys.exc_value 
     171                wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    176172                 
    177173            contrast = self.contrast_ctl.GetValue().lstrip().rstrip() 
     
    192188                check_float(self.volume_err_ctl) 
    193189            except: 
    194                 raise 
    195                 #msg= "Error occurs for volume fraction: %s"%sys.exc_value 
    196                 #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     190                msg= "Error occurs for volume fraction: %s"%sys.exc_value 
     191                wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    197192            try: 
    198193                s, ds = inv.get_surface_with_error(contrast=contrast, 
     
    203198                check_float(self.surface_err_ctl) 
    204199            except: 
    205                 raise 
    206                 #msg= "Error occurs for surface: %s"%sys.exc_value 
    207                 #wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
     200                msg= "Error occurs for surface: %s"%sys.exc_value 
     201                wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 
    208202                 
    209203        else: 
     
    218212            @param name: Data's name to use for the legend 
    219213        """ 
    220         print "went here " 
     214        #print "went here " 
    221215        plottable = self.graph.get_plottable(name=name) 
    222216        if plottable is not None: 
    223217            self.graph.delete(plottable) 
    224         print "name--->",name 
     218        #print "name--->",name 
    225219        # Create a plottable data 
    226220        new_plot = Data1D(x=[], y=[], dx=None, dy=None) 
Note: See TracChangeset for help on using the changeset viewer.