Changeset 0cc77d8 in sasview for src/sas/sasgui/perspectives/fitting
- Timestamp:
- May 1, 2017 5:00:53 PM (8 years ago)
- Children:
- 733cdcd
- Parents:
- b9d74f3 (diff), c00a797a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (05/01/17 17:00:53)
- git-committer:
- GitHub <noreply@…> (05/01/17 17:00:53)
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r9c0f3c17 ra1b8fee 2 2 Base Page for fitting 3 3 """ 4 from __future__ import print_function 5 4 6 import sys 5 7 import os … … 657 659 # It seems MAC needs wxCallAfter 658 660 if event.GetId() == GUIFRAME_ID.COPYEX_ID: 659 print "copy excel"661 print("copy excel") 660 662 wx.CallAfter(self.get_copy_excel) 661 663 elif event.GetId() == GUIFRAME_ID.COPYLAT_ID: 662 print "copy latex"664 print("copy latex") 663 665 wx.CallAfter(self.get_copy_latex) 664 666 else: … … 3368 3370 except Exception: 3369 3371 logger.error(traceback.format_exc()) 3370 print 3371 sys.exc_info()[1] 3372 print("Error in BasePage._paste_poly_help: %s" % \ 3373 sys.exc_info()[1]) 3372 3374 3373 3375 def _set_disp_cb(self, isarray, item): … … 3398 3400 Moveit; This method doesn't belong here 3399 3401 """ 3400 print "BasicPage.update_pinhole_smear was called: skipping"3402 print("BasicPage.update_pinhole_smear was called: skipping") 3401 3403 return 3402 3404 … … 3574 3576 # check model type to show sizer 3575 3577 if self.model is not None: 3576 print "_set_model_sizer_selection: disabled."3578 print("_set_model_sizer_selection: disabled.") 3577 3579 # self._set_model_sizer_selection(self.model) 3578 3580 -
src/sas/sasgui/perspectives/fitting/fitting.py
rb9d74f3 r0cc77d8 11 11 #copyright 2009, University of Tennessee 12 12 ################################################################################ 13 from __future__ import print_function 14 13 15 import re 14 16 import sys … … 1253 1255 """ 1254 1256 """ 1255 print "update_fit result", result1257 print("update_fit result", result) 1256 1258 1257 1259 def _batch_fit_complete(self, result, pars, page_id, … … 2046 2048 res = (fn - gn) / en 2047 2049 except ValueError: 2048 print "Unmatch lengths %s, %s, %s" % (len(fn), len(gn), len(en))2050 print("Unmatch lengths %s, %s, %s" % (len(fn), len(gn), len(en))) 2049 2051 return 2050 2052 -
src/sas/sasgui/perspectives/fitting/models.py
rb9d74f3 r0cc77d8 2 2 Utilities to manage models 3 3 """ 4 from __future__ import print_function 5 4 6 import traceback 5 7 import os … … 141 143 type, value, tb = sys.exc_info() 142 144 if type is not None and issubclass(type, py_compile.PyCompileError): 143 print "Problem with", repr(value)145 print("Problem with", repr(value)) 144 146 raise type(value).with_traceback(tb) 145 147 return 1 -
src/sas/sasgui/perspectives/fitting/fit_thread.py
r959eb01 rb9d74f3 54 54 except KeyboardInterrupt: 55 55 msg = "Fitting: terminated by the user." 56 raise KeyboardInterrupt , msg56 raise KeyboardInterrupt(msg) 57 57 58 58 def compute(self): -
src/sas/sasgui/perspectives/fitting/fitpage.py
red2276f rb9d74f3 1847 1847 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1848 1848 info="error")) 1849 raise ValueError , msg1849 raise ValueError(msg) 1850 1850 1851 1851 else: … … 1859 1859 wx.PostEvent(self._manager.parent, StatusEvent(status=msg, 1860 1860 info="error")) 1861 raise ValueError , msg1861 raise ValueError(msg) 1862 1862 # Maximum value of data 1863 1863 qmax = math.sqrt(x * x + y * y) … … 2098 2098 self._on_fit_complete() 2099 2099 if out is None or not np.isfinite(chisqr): 2100 raise ValueError , "Fit error occured..."2100 raise ValueError("Fit error occured...") 2101 2101 2102 2102 is_modified = False … … 2173 2173 i += 1 2174 2174 else: 2175 raise ValueError , "onsetValues: Invalid parameters..."2175 raise ValueError("onsetValues: Invalid parameters...") 2176 2176 # Show error title when any errors displayed 2177 2177 if has_error: -
src/sas/sasgui/perspectives/fitting/fitpanel.py
r67b0a99 rb9d74f3 125 125 if uid not in self.opened_pages: 126 126 msg = "Fitpanel cannot find ID: %s in self.opened_pages" % str(uid) 127 raise ValueError , msg127 raise ValueError(msg) 128 128 else: 129 129 return self.opened_pages[uid] … … 389 389 """ 390 390 if data.__class__.__name__ != "list": 391 raise ValueError , "Fitpanel delete_data expect list of id"391 raise ValueError("Fitpanel delete_data expect list of id") 392 392 else: 393 393 for page in self.opened_pages.values(): -
src/sas/sasgui/perspectives/fitting/model_thread.py
r7432acb rb9d74f3 65 65 if self.data is None: 66 66 msg = "Compute Calc2D receive data = %s.\n" % str(self.data) 67 raise ValueError , msg67 raise ValueError(msg) 68 68 69 69 # Define matrix where data will be plotted -
src/sas/sasgui/perspectives/fitting/pagestate.py
r959eb01 rb9d74f3 1014 1014 msg = "PageState no longer supports non-CanSAS" 1015 1015 msg += " format for fitting files" 1016 raise RuntimeError , msg1016 raise RuntimeError(msg) 1017 1017 1018 1018 if node.get('version'): … … 1310 1310 else: 1311 1311 self.call_back(format=ext) 1312 raise RuntimeError , "%s is not a file" % path1312 raise RuntimeError("%s is not a file" % path) 1313 1313 1314 1314 # Return output consistent with the loader's api
Note: See TracChangeset
for help on using the changeset viewer.