Changes in src/sas/sasgui/perspectives/fitting/basepage.py [58a8f76:c192960] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r58a8f76 rc192960 641 641 # get the strings for report 642 642 report_str, text_str = self.state.report(fig_urls=refs) 643 644 643 # Show the dialog 645 644 report_list = [report_str, text_str, images] 646 dialog = ReportDialog(report_list, None, wx.ID_ANY, "")645 dialog = ReportDialog(report_list, imgRAM, refs, None, wx.ID_ANY, "") 647 646 dialog.Show() 648 647 … … 677 676 refs.append('memory:' + name) 678 677 imgRAM.AddFile(name, canvas.bitmap, wx.BITMAP_TYPE_PNG) 679 680 678 # append figs 681 679 images.append(fig) … … 1367 1365 except Exception: 1368 1366 logger.error(traceback.format_exc()) 1369 selection = self._find_polyfunc_selection(disp_model)1367 index, selection = self._find_polyfunc_selection(disp_model) 1370 1368 for list in self.fittable_param: 1371 1369 if list[1] == key and list[7] is not None: 1372 list[7].SetSelection( selection)1370 list[7].SetSelection(index) 1373 1371 # For the array disp_model, set the values and weights 1374 if selection == 1:1372 if selection == 'array': 1375 1373 disp_model.set_weights(self.values[key], 1376 1374 self.weights[key]) … … 1385 1383 logger.error(traceback.format_exc()) 1386 1384 # For array, disable all fixed params 1387 if selection == 1:1385 if selection == 'array': 1388 1386 for item in self.fixed_param: 1389 1387 if item[1].split(".")[0] == key.split(".")[0]: … … 1472 1470 # we need to check here ourselves. 1473 1471 if not is_modified: 1474 is_modified = (self._check_value_enter(self.fittable_param) 1475 or self._check_value_enter(self.fixed_param) 1476 or self._check_value_enter(self.parameters)) 1472 is_modified = self._check_value_enter(self.fittable_param) 1473 is_modified = self._check_value_enter( 1474 self.fixed_param) or is_modified 1475 is_modified = self._check_value_enter( 1476 self.parameters) or is_modified 1477 1477 1478 1478 # Here we should check whether the boundaries have been modified. … … 1536 1536 data=[self.data]) 1537 1537 # Check the values 1538 is_modified = (self._check_value_enter(self.fittable_param)1539 or self._check_value_enter(self.fixed_param)1540 or self._check_value_enter(self.parameters))1538 is_modified = self._check_value_enter(self.fittable_param) 1539 is_modified = self._check_value_enter(self.fixed_param) or is_modified 1540 is_modified = self._check_value_enter(self.parameters) or is_modified 1541 1541 1542 1542 # If qmin and qmax have been modified, update qmin and qmax and … … 2324 2324 2325 2325 # Update value in model if it has changed 2326 if value != self.model.getParam(name): 2326 if (value != self.model.getParam(name) or 2327 (np.isnan(value) and np.isnan(self.model.getParam(name)))): 2327 2328 self.model.setParam(name, value) 2328 2329 is_modified = True … … 2668 2669 def _find_polyfunc_selection(self, disp_func=None): 2669 2670 """ 2670 F Ind Comboox selection from disp_func2671 Find Combobox selection from disp_func 2671 2672 2672 2673 :param disp_function: dispersion distr. function … … 2675 2676 if disp_func is not None: 2676 2677 try: 2677 return POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 2678 return (list(POLYDISPERSITY_MODELS).index(disp_func.type), 2679 disp_func.type) 2678 2680 except ValueError: 2679 2681 pass # Fall through to default class 2680 return POLYDISPERSITY_MODELS.keys().index('gaussian')2682 return (list(POLYDISPERSITY_MODELS).index('gaussian'), 'gaussian') 2681 2683 2682 2684 def on_reset_clicked(self, event):
Note: See TracChangeset
for help on using the changeset viewer.