Changeset cdd1c3b in sasview
- Timestamp:
- Jul 11, 2016 4:36:55 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:
- 1d4b9e5
- Parents:
- 033c14c
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/08/16 09:21:30)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r033c14c rcdd1c3b 152 152 Called when Extrapolate button is pressed. 153 153 """ 154 if self._data is None:155 msg = "Data must be loaded in order to perform an extrapolation."156 wx.PostEvent(self.parent.parent, StatusEvent(status=msg))157 return158 154 if not self._validate_inputs: 159 155 msg = "Invalid Q range entered." … … 164 160 self._calculator.upperq = self.qmax 165 161 self._calculator.background = self.background 166 self._extrapolated_data = self._calculator.compute_extrapolation() 162 try: 163 self._extrapolated_data = self._calculator.compute_extrapolation() 164 except: 165 msg = "Error extrapolating data." 166 wx.MessageBox(msg, 'error') 167 wx.PostEvent(self._manager.parent, 168 StatusEvent(status=msg, info="Error")) 169 self._transform_btn.Disable() 170 return 167 171 # TODO: Find way to set xlim and ylim so full range of data can be 168 172 # plotted … … 183 187 Called when Transform button is pressed. 184 188 """ 185 transformed_data = self._calculator.compute_transform( 186 self._extrapolated_data, self.background) 189 try: 190 transformed_data = self._calculator.compute_transform( 191 self._extrapolated_data, self.background) 192 except: 193 transformed_data = None 194 if transformed_data is None: 195 msg = "Error calculating Transform." 196 wx.MessageBox(msg, 'error') 197 wx.PostEvent(self._manager.parent, 198 StatusEvent(status=msg, info="Error")) 199 self._extract_btn.Disable() 200 return 187 201 self._transformed_data = transformed_data 188 202 from sas.sasgui.perspectives.corfunc.corfunc import TRANSFORM_LABEL … … 194 208 195 209 def extract_parameters(self, event=None): 196 params = None197 210 try: 198 211 params = self._calculator.extract_parameters(self._transformed_data) … … 201 214 if params is None: 202 215 msg = "Error extracting parameters." 216 wx.MessageBox(msg, 'error') 203 217 wx.PostEvent(self._manager.parent, 204 StatusEvent(status=msg, info=" error"))218 StatusEvent(status=msg, info="Error")) 205 219 return 206 220 for key in OUTPUT_STRINGS.keys():
Note: See TracChangeset
for help on using the changeset viewer.