Changeset b9d74f3 in sasview for src/sas/sascalc/pr/invertor.py
- Timestamp:
- Apr 20, 2017 6:29:34 AM (8 years ago)
- Children:
- 0cc77d8
- Parents:
- b636dfc5
- git-author:
- Andrew Nelson <andyfaff@…> (04/20/17 06:25:57)
- git-committer:
- Andrew Nelson <andyfaff@…> (04/20/17 06:29:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.