- Timestamp:
- Mar 7, 2017 3:15:13 PM (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:
- 096181d
- Parents:
- 7e98655
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r7e98655 rd85f1d8a 1245 1245 # we have two more options for smearing 1246 1246 if self.pinhole_smearer.GetValue(): 1247 self.dx_percent = state.dx_ max1247 self.dx_percent = state.dx_percent 1248 1248 if self.dx_percent is not None: 1249 self.smear_pinhole_ max.SetValue(str(self.dx_percent))1249 self.smear_pinhole_percent.SetValue(str(self.dx_percent)) 1250 1250 self.onPinholeSmear(event=None) 1251 1251 elif self.slit_smearer.GetValue(): -
src/sas/sasgui/perspectives/fitting/fitpage.py
r7e98655 rd85f1d8a 2309 2309 if len_data < 2: 2310 2310 len_data = 2 2311 self.dx_percent = float(get_pin_percent.GetValue()) / 1002311 self.dx_percent = float(get_pin_percent.GetValue()) 2312 2312 if self.dx_percent < 0: 2313 2313 get_pin_percent.SetBackgroundColour("pink") 2314 2314 msg = "Model Error:This value can not be negative!!!" 2315 2315 elif self.dx_percent is not None: 2316 percent = self.dx_percent/100 2316 2317 if self._is_2D(): 2317 data.dqx_data[data.dqx_data == 0] = \ 2318 self.dx_percent * data.qx_data 2319 data.dqy_data[data.dqy_data == 0] = \ 2320 self.dx_percent * data.qy_data 2318 data.dqx_data[data.dqx_data == 0] = percent * data.qx_data 2319 data.dqy_data[data.dqy_data == 0] = percent * data.qy_data 2321 2320 else: 2322 data.dx = self.dx_percent * data.x2321 data.dx = percent * data.x 2323 2322 self.current_smearer = smear_selection(data, self.model) 2324 2323 # 2D need to set accuracy -
src/sas/sasgui/perspectives/fitting/pagestate.py
r71601312 rd85f1d8a 74 74 ["dq_l", "dq_l", "float"], 75 75 ["dq_r", "dq_r", "float"], 76 ["dx_max", "dx_max", "float"], 77 ["dx_min", "dx_min", "float"], 76 ["dx_percent", "dx_percent", "float"], 78 77 ["dxl", "dxl", "float"], 79 78 ["dxw", "dxw", "float"]] … … 215 214 self.dq_l = None 216 215 self.dq_r = None 217 self.dx_max = None 218 self.dx_min = None 216 self.dx_percent = None 219 217 self.dxl = None 220 218 self.dxw = None … … 343 341 obj.dq_l = copy.deepcopy(self.dq_l) 344 342 obj.dq_r = copy.deepcopy(self.dq_r) 345 obj.dx_max = copy.deepcopy(self.dx_max) 346 obj.dx_min = copy.deepcopy(self.dx_min) 343 obj.dx_percent = copy.deepcopy(self.dx_percent) 347 344 obj.dxl = copy.deepcopy(self.dxl) 348 345 obj.dxw = copy.deepcopy(self.dxw) … … 562 559 rep += "dq_l : %s\n" % self.dq_l 563 560 rep += "dq_r : %s\n" % self.dq_r 564 rep += "dx_max : %s\n" % str(self.dx_max) 565 rep += "dx_min : %s\n" % str(self.dx_min) 561 rep += "dx_percent : %s\n" % str(self.dx_percent) 566 562 rep += "dxl : %s\n" % str(self.dxl) 567 563 rep += "dxw : %s\n" % str(self.dxw) … … 1049 1045 1050 1046 for item in LIST_OF_STATE_ATTRIBUTES: 1051 node = get_content('ns:%s' % item[0], entry) 1047 try: 1048 node = get_content('ns:%s' % item[0], entry) 1049 except Exception as e: 1050 if item[0] == "dx_percent": 1051 msg = "Custom pinhole smearing has changed " 1052 msg += "as of v4.1.0. dx_min will be used to " 1053 msg += "calculate %Q for smearing purposes." 1054 logging.warning(msg) 1055 node = get_content('ns:%s' % 'dx_min', entry) 1056 else: 1057 msg = "Could not find node %s.\n" % item[0] 1058 msg += e.message 1059 logging.error(msg) 1052 1060 setattr(self, item[0], parse_entry_helper(node, item)) 1053 1061
Note: See TracChangeset
for help on using the changeset viewer.