Changeset 25e3fc9 in sasview for sansview/perspectives/fitting
- Timestamp:
- Jan 26, 2010 5:46:22 PM (15 years ago)
- 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
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fit_thread.py
r662da312 r25e3fc9 155 155 except : 156 156 #Stop on exception during fitting. Todo: need to put some mssg and reset progress bar. 157 #msg= " Fit Error occurred... %s"%sys.exc_value158 #wx.PostEvent(self.parent, StatusEvent(status= msg,type="stop"))159 raise157 msg= " Fit Error occurred... %s"%sys.exc_value 158 wx.PostEvent(self.parent, StatusEvent(status= msg,type="stop")) 159 160 160 -
sansview/perspectives/fitting/fitting.py
r9237df4 r25e3fc9 459 459 self.current_pg= page 460 460 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 465 464 466 465 #Do the simultaneous fit … … 501 500 print "in pluging" 502 501 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 507 505 508 506 def ready_fit(self, calc_fit): … … 641 639 value.clear_model_param() 642 640 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 647 644 648 645 def _onSelect(self,event): … … 776 773 777 774 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 782 778 783 779 … … 829 825 page.onsetValues(result.fitness, small_param_name,small_out,small_cov) 830 826 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 836 831 837 832 … … 1205 1200 1206 1201 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 1212 1206 1213 1207 def _draw_model1D(self, model, data=None, smearer= None, -
sansview/perspectives/fitting/invariant_panel.py
r9237df4 r25e3fc9 131 131 check_float(self.invariant_err_ctl) 132 132 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 137 136 #Compute qstar extrapolated to low q range 138 137 #Clear the previous extrapolated plot 139 print "low_q, high_q",low_q, high_q138 #print "low_q, high_q",low_q, high_q 140 139 if low_q: 141 140 try: … … 148 147 self._plot_data(data=low_in_data, name=self.data.name+"Fitted data for low_Q") 149 148 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")) 153 151 if high_q: 154 152 try: … … 161 159 self._plot_data(data=high_in_data, name=self.data.name+"Fitted data for high_Q") 162 160 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")) 166 163 try: 167 164 qstar_total, qstar_total_err = inv.get_qstar_with_error(extrapolation) … … 171 168 check_float(self.invariant_total_err_ctl) 172 169 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")) 176 172 177 173 contrast = self.contrast_ctl.GetValue().lstrip().rstrip() … … 192 188 check_float(self.volume_err_ctl) 193 189 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")) 197 192 try: 198 193 s, ds = inv.get_surface_with_error(contrast=contrast, … … 203 198 check_float(self.surface_err_ctl) 204 199 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")) 208 202 209 203 else: … … 218 212 @param name: Data's name to use for the legend 219 213 """ 220 print "went here "214 #print "went here " 221 215 plottable = self.graph.get_plottable(name=name) 222 216 if plottable is not None: 223 217 self.graph.delete(plottable) 224 print "name--->",name218 #print "name--->",name 225 219 # Create a plottable data 226 220 new_plot = Data1D(x=[], y=[], dx=None, dy=None)
Note: See TracChangeset
for help on using the changeset viewer.