Changeset a3ed157 in sasview for src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
- Timestamp:
- Aug 22, 2016 10:30:04 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6ffa0dd
- Parents:
- 20ced5c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r20ced5c ra3ed157 172 172 self.set_qmin(lower) 173 173 self.set_qmax((upper1, upper2)) 174 self. set_background(self._calculator.compute_background(self.qmax))174 self._compute_background() 175 175 176 176 def get_data(self): … … 210 210 try: 211 211 params, self._extrapolated_data = self._calculator.compute_extrapolation() 212 except: 213 msg = "Error extrapolating data." 212 except Exception as e: 213 msg = "Error extrapolating data:\n" 214 msg += str(e) 214 215 wx.PostEvent(self._manager.parent, 215 StatusEvent(status=msg, info=" Error"))216 StatusEvent(status=msg, info="error")) 216 217 self._transform_btn.Disable() 217 218 return … … 374 375 375 376 def _compute_background(self, event=None): 376 self.set_background(self._calculator.compute_background(self.qmax)) 377 if event is not None: 378 event.Skip() 379 self._on_enter_input() 380 try: 381 bg = self._calculator.compute_background(self.qmax) 382 self.set_background(bg) 383 except Exception as e: 384 msg = "Error computing background level:\n" 385 msg += str(e) 386 wx.PostEvent(self._manager.parent, 387 StatusEvent(status=msg, info="error")) 377 388 378 389 def _on_enter_input(self, event=None):
Note: See TracChangeset
for help on using the changeset viewer.