Changeset 0cc77d8 in sasview for src/sas/sascalc/pr
- Timestamp:
- May 1, 2017 3: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 15:00:53)
- git-committer:
- GitHub <noreply@…> (05/01/17 15:00:53)
- Location:
- src/sas/sascalc/pr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/pr/fit/AbstractFitEngine.py
rb9d74f3 r0cc77d8 1 from __future__ import print_function 1 2 2 3 import copy … … 630 631 """ 631 632 """ 632 print str(self)633 print(str(self)) -
src/sas/sascalc/pr/fit/Loader.py
rb9d74f3 r0cc77d8 1 from __future__ import print_function 2 1 3 # class Loader to load any king of file 2 4 #import wx … … 54 56 self.dx = np.zeros(len(self.x)) 55 57 except: 56 print "READ ERROR", line58 print("READ ERROR", line) 57 59 # Sanity check 58 60 if not len(self.x) == len(self.dx): … … 80 82 load = Load() 81 83 load.set_filename("testdata_line.txt") 82 print load.get_filename()84 print(load.get_filename()) 83 85 load.set_values() 84 print load.get_values()86 print(load.get_values()) 85 87 86 88 -
src/sas/sascalc/pr/fit/expression.py
rb9d74f3 r0cc77d8 1 from __future__ import print_function 2 1 3 # This program is public domain 2 4 """ -
src/sas/sascalc/pr/num_term.py
r7432acb ra1b8fee 1 from __future__ import print_function 2 1 3 import math 2 4 import numpy as np … … 197 199 # Testing estimator 198 200 est = NTermEstimator(invert) 199 print est.num_terms()201 print(est.num_terms()) -
src/sas/sascalc/pr/invertor.py
r45dffa69 rb9d74f3 148 148 msg = "Invertor: one of your q-values is zero. " 149 149 msg += "Delete that entry before proceeding" 150 raise ValueError , msg150 raise ValueError(msg) 151 151 return self.set_x(value) 152 152 elif name == 'y': … … 159 159 msg = "Invertor: d_max must be greater than zero." 160 160 msg += "Correct that entry before proceeding" 161 raise ValueError , msg161 raise ValueError(msg) 162 162 return self.set_dmax(value) 163 163 elif name == 'q_min': … … 181 181 return self.set_has_bck(0) 182 182 else: 183 raise ValueError , "Invertor: has_bck can only be True or False"183 raise ValueError("Invertor: has_bck can only be True or False") 184 184 185 185 return Cinvertor.__setattr__(self, name, value) … … 325 325 if self.is_valid() <= 0: 326 326 msg = "Invertor.invert: Data array are of different length" 327 raise RuntimeError , msg327 raise RuntimeError(msg) 328 328 329 329 p = np.ones(nfunc) … … 358 358 if self.is_valid() <= 0: 359 359 msg = "Invertor.invert: Data arrays are of different length" 360 raise RuntimeError , msg360 raise RuntimeError(msg) 361 361 362 362 p = np.ones(nfunc) … … 442 442 if self.is_valid() < 0: 443 443 msg = "Invertor: invalid data; incompatible data lengths." 444 raise RuntimeError , msg444 raise RuntimeError(msg) 445 445 446 446 self.nfunc = nfunc … … 467 467 self._get_matrix(nfunc, nq, a, b) 468 468 except: 469 raise RuntimeError , "Invertor: could not invert I(Q)\n %s" % sys.exc_value469 raise RuntimeError("Invertor: could not invert I(Q)\n %s" % sys.exc_value) 470 470 471 471 # Perform the inversion (least square fit) … … 751 751 except: 752 752 msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value 753 raise RuntimeError , msg753 raise RuntimeError(msg) 754 754 else: 755 755 msg = "Invertor.from_file: '%s' is not a file" % str(path) 756 raise RuntimeError , msg756 raise RuntimeError(msg)
Note: See TracChangeset
for help on using the changeset viewer.