Changeset fa81e94 in sasview for src/sas/sasgui/perspectives/fitting/fitpage.py
- Timestamp:
- Nov 15, 2017 4:33:09 AM (7 years ago)
- Branches:
- 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
- Children:
- d4881f6a
- Parents:
- 7c487846
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpage.py
- Property mode changed from 100644 to 100755
r3bd677b rfa81e94 281 281 282 282 # Fit button 283 self.btFit = wx.Button(self, self._ids.next(), 'Fit')283 self.btFit = wx.Button(self, next(self._ids), 'Fit') 284 284 self.default_bt_colour = self.btFit.GetDefaultAttributes() 285 285 self.btFit.Bind(wx.EVT_BUTTON, self._onFit, id=self.btFit.GetId()) … … 377 377 378 378 # Update and Draw button 379 self.draw_button = wx.Button(self, self._ids.next(), 'Compute')379 self.draw_button = wx.Button(self, next(self._ids), 'Compute') 380 380 self.draw_button.Bind(wx.EVT_BUTTON, 381 381 self._onDraw, id=self.draw_button.GetId()) … … 532 532 self.qmin.Bind(wx.EVT_TEXT, self.on_qrange_text) 533 533 self.qmax.Bind(wx.EVT_TEXT, self.on_qrange_text) 534 wx_id = self._ids.next()534 wx_id = next(self._ids) 535 535 self.reset_qrange = wx.Button(self, wx_id, 'Reset') 536 536 … … 540 540 sizer = wx.GridSizer(5, 5, 2, 6) 541 541 542 self.btEditMask = wx.Button(self, self._ids.next(), 'Editor')542 self.btEditMask = wx.Button(self, next(self._ids), 'Editor') 543 543 self.btEditMask.Bind(wx.EVT_BUTTON, self._onMask, 544 544 id=self.btEditMask.GetId()) … … 660 660 self.text_disp_min.Show(True) 661 661 662 for item in self.model.dispersion.keys():662 for item in list(self.model.dispersion.keys()): 663 663 if not self.magnetic_on: 664 664 if item in self.model.magnetic_params: … … 675 675 676 676 iy += 1 677 for p in self.model.dispersion[item].keys():677 for p in list(self.model.dispersion[item].keys()): 678 678 679 679 if p == "width": … … 765 765 disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 766 766 style=wx.CB_READONLY, name='%s' % name1) 767 for key, value in POLYDISPERSITY_MODELS.ite ritems():767 for key, value in POLYDISPERSITY_MODELS.items(): 768 768 name_disp = str(key) 769 769 disp_box.Append(name_disp, value) … … 779 779 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 780 780 first_orient = True 781 for item in self.model.dispersion.keys():781 for item in list(self.model.dispersion.keys()): 782 782 if not self.magnetic_on: 783 783 if item in self.model.magnetic_params: … … 795 795 796 796 iy += 1 797 for p in self.model.dispersion[item].keys():797 for p in list(self.model.dispersion[item].keys()): 798 798 799 799 if p == "width": … … 929 929 disp_box = wx.ComboBox(self, wx.ID_ANY, size=(65, -1), 930 930 style=wx.CB_READONLY, name='%s' % name1) 931 for key, value in POLYDISPERSITY_MODELS.ite ritems():931 for key, value in POLYDISPERSITY_MODELS.items(): 932 932 name_disp = str(key) 933 933 disp_box.Append(name_disp, value) … … 1370 1370 except: 1371 1371 tcrtl.SetBackgroundColour("pink") 1372 msg = "Model Error:wrong value entered : %s" % sys.exc_ value1372 msg = "Model Error:wrong value entered : %s" % sys.exc_info()[1] 1373 1373 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 1374 1374 return … … 1482 1482 else: 1483 1483 tcrtl.SetBackgroundColour("pink") 1484 msg = "Model Error:wrong value entered : %s" % sys.exc_ value1484 msg = "Model Error:wrong value entered : %s" % sys.exc_info()[1] 1485 1485 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 1486 1486 return 1487 1487 except: 1488 1488 tcrtl.SetBackgroundColour("pink") 1489 msg = "Model Error:wrong value entered : %s" % sys.exc_ value1489 msg = "Model Error:wrong value entered : %s" % sys.exc_info()[1] 1490 1490 wx.PostEvent(self._manager.parent, StatusEvent(status=msg)) 1491 1491 return … … 1733 1733 ind = 0 1734 1734 while(ind < len(list)): 1735 for key, val in list .items():1735 for key, val in list(list.items()): 1736 1736 if val == ind: 1737 1737 fun_box.Append(key, val) … … 1865 1865 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1866 1866 info="error")) 1867 raise ValueError , msg1867 raise ValueError(msg) 1868 1868 1869 1869 else: … … 1877 1877 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1878 1878 info="error")) 1879 raise ValueError , msg1879 raise ValueError(msg) 1880 1880 # Maximum value of data 1881 1881 qmax = math.sqrt(x * x + y * y) … … 2118 2118 self._on_fit_complete() 2119 2119 if out is None or not np.isfinite(chisqr): 2120 raise ValueError , "Fit error occured..."2120 raise ValueError("Fit error occured...") 2121 2121 2122 2122 is_modified = False … … 2193 2193 i += 1 2194 2194 else: 2195 raise ValueError , "onsetValues: Invalid parameters..."2195 raise ValueError("onsetValues: Invalid parameters...") 2196 2196 # Show error title when any errors displayed 2197 2197 if has_error: … … 2951 2951 2952 2952 # type can be either Guassian or Array 2953 if len( self.model.dispersion.values()) > 0:2954 type = self.model.dispersion.values()[0]["type"]2953 if len(list(self.model.dispersion.values())) > 0: 2954 type = list(self.model.dispersion.values())[0]["type"] 2955 2955 else: 2956 2956 type = "Gaussian"
Note: See TracChangeset
for help on using the changeset viewer.