Changeset 8f83719f in sasview for src/sas/sascalc
- Timestamp:
- Nov 24, 2017 9:57:08 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:
- f4480f0
- Parents:
- cb4d219
- Location:
- src/sas/sascalc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/resolution_calculator.py
rfbfc488 r8f83719f 1094 1094 output.qx_data = qx_value 1095 1095 output.qy_data = qy_value 1096 except :1097 logger.error( sys.exc_value)1096 except Exception as ex: 1097 logger.error(ex) 1098 1098 1099 1099 return output -
src/sas/sascalc/pr/invertor.py
rf1ec901 r8f83719f 500 500 cov = np.linalg.pinv(inv_cov) 501 501 err = math.fabs(chi2 / float(npts - nfunc)) * cov 502 except :502 except Exception as ex: 503 503 # We were not able to estimate the errors 504 504 # Return an empty error matrix 505 logger.error( sys.exc_value)505 logger.error(ex) 506 506 507 507 # Keep a copy of the last output … … 544 544 try: 545 545 return estimator.num_terms(isquit_func) 546 except :546 except Exception as ex: 547 547 # If we fail, estimate alpha and return the default 548 548 # number of terms 549 549 best_alpha, _, _ = self.estimate_alpha(self.nfunc) 550 logger.warning("Invertor.estimate_numterms: %s" % sys.exc_value)550 logger.warning("Invertor.estimate_numterms: %s" % ex) 551 551 return self.nfunc, best_alpha, "Could not estimate number of terms" 552 552 … … 634 634 return best_alpha, message, elapsed 635 635 636 except :637 message = "Invertor.estimate_alpha: %s" % sys.exc_value636 except Exception as ex: 637 message = "Invertor.estimate_alpha: %s" % ex 638 638 return 0, message, elapsed 639 639 … … 754 754 self.cov[i][i] = float(toks2[1]) 755 755 756 except :757 msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value756 except Exception as ex: 757 msg = "Invertor.from_file: corrupted file\n%s" % ex 758 758 raise RuntimeError(msg) 759 759 else: -
src/sas/sascalc/pr/num_term.py
ra1b8fee r8f83719f 183 183 data_y = np.append(data_y, test_y) 184 184 data_err = np.append(data_err, err) 185 except :186 logger.error( sys.exc_value)185 except Exception as ex: 186 logger.error(ex) 187 187 188 188 return data_x, data_y, data_err
Note: See TracChangeset
for help on using the changeset viewer.