Changeset 53b6b74 in sasview for invariantview
- Timestamp:
- Mar 4, 2010 8:00:09 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:
- f5fda87
- Parents:
- d5f0dcb9
- Location:
- invariantview/perspectives/invariant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant.py
r272d91e r53b6b74 28 28 """ 29 29 ## Plug-in name. It will appear on the application menu. 30 self.sub_menu = " invariant"30 self.sub_menu = "Invariant" 31 31 32 32 ## Reference to the parent window. Filled by get_panels() below. -
invariantview/perspectives/invariant/invariant_panel.py
rd5f0dcb9 r53b6b74 157 157 if low_q: 158 158 try: 159 qstar_low = inv.get_qstar_low()159 qstar_low, qstar_low_err = inv.get_qstar_low() 160 160 self.invariant_low_ctl.SetValue(format_number(qstar_low)) 161 161 #plot data … … 172 172 if high_q: 173 173 try: 174 qstar_high = inv.get_qstar_high()174 qstar_high, qstar_high_err = inv.get_qstar_high() 175 175 self.invariant_high_ctl.SetValue(format_number(qstar_high)) 176 176 #plot data … … 195 195 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 196 196 197 porod_const = self.porod_const_ctl.GetValue().lstrip().rstrip() 198 if porod_const == "": 199 porod_const = None 200 if not (porod_const is None): 201 if check_float(self.porod_const_ctl): 202 porod_const = float(porod_const) 203 try: 204 v, dv = inv.get_volume_fraction_with_error(contrast=contrast) 205 self.volume_ctl.SetValue(format_number(v)) 206 self.volume_err_ctl.SetValue(format_number(dv)) 207 except: 208 msg= "Error occurs for volume fraction: %s"%sys.exc_value 209 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 210 contrast = self.contrast_ctl.GetValue().lstrip().rstrip() 211 if contrast == "": 212 contrast = None 213 if not (contrast is None): 214 if check_float(self.contrast_ctl): 215 contrast = float(contrast) 216 try: 217 if not (porod_const is None): 218 s, ds = inv.get_surface_with_error(contrast=contrast, 219 porod_const=porod_const) 220 self.surface_ctl.SetValue(format_number(s)) 221 self.surface_err_ctl.SetValue(format_number(ds)) 222 except: 223 msg= "Error occurs for surface: %s"%sys.exc_value 224 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 197 # Parse additional parameters 198 par_str = self.porod_const_ctl.GetValue().strip() 199 porod_const = None 200 if len(par_str)>0 and check_float(self.porod_const_ctl): 201 porod_const = float(par_str) 202 203 par_str = self.contrast_ctl.GetValue().strip() 204 contrast = None 205 if len(par_str)>0 and check_float(self.contrast_ctl): 206 contrast = float(par_str) 207 208 if contrast is not None: 209 try: 210 v, dv = inv.get_volume_fraction_with_error(contrast=contrast) 211 self.volume_ctl.SetValue(format_number(v)) 212 self.volume_err_ctl.SetValue(format_number(dv)) 213 except: 214 msg= "Error occurs for volume fraction: %s"%sys.exc_value 215 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 216 217 if contrast is not None and porod_const is not None: 218 try: 219 s, ds = inv.get_surface_with_error(contrast=contrast, 220 porod_const=porod_const) 221 self.surface_ctl.SetValue(format_number(s)) 222 self.surface_err_ctl.SetValue(format_number(ds)) 223 except: 224 msg= "Error occurs for surface: %s"%sys.exc_value 225 wx.PostEvent(self.parent, StatusEvent(status= msg, type="stop")) 225 226 226 227 else:
Note: See TracChangeset
for help on using the changeset viewer.