Changeset 8f83719f in sasview for src/sas/sascalc


Ignore:
Timestamp:
Nov 24, 2017 9:57:08 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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
Message:

More inversion work on details in validation, UI design and such

Location:
src/sas/sascalc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/calculator/resolution_calculator.py

    rfbfc488 r8f83719f  
    10941094            output.qx_data = qx_value 
    10951095            output.qy_data = qy_value 
    1096         except: 
    1097             logger.error(sys.exc_value) 
     1096        except Exception as ex: 
     1097            logger.error(ex) 
    10981098 
    10991099        return output 
  • src/sas/sascalc/pr/invertor.py

    rf1ec901 r8f83719f  
    500500            cov = np.linalg.pinv(inv_cov) 
    501501            err = math.fabs(chi2 / float(npts - nfunc)) * cov 
    502         except: 
     502        except Exception as ex: 
    503503            # We were not able to estimate the errors 
    504504            # Return an empty error matrix 
    505             logger.error(sys.exc_value) 
     505            logger.error(ex) 
    506506 
    507507        # Keep a copy of the last output 
     
    544544        try: 
    545545            return estimator.num_terms(isquit_func) 
    546         except: 
     546        except Exception as ex: 
    547547            # If we fail, estimate alpha and return the default 
    548548            # number of terms 
    549549            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) 
    551551            return self.nfunc, best_alpha, "Could not estimate number of terms" 
    552552 
     
    634634                return best_alpha, message, elapsed 
    635635 
    636         except: 
    637             message = "Invertor.estimate_alpha: %s" % sys.exc_value 
     636        except Exception as ex: 
     637            message = "Invertor.estimate_alpha: %s" % ex 
    638638            return 0, message, elapsed 
    639639 
     
    754754                        self.cov[i][i] = float(toks2[1]) 
    755755 
    756             except: 
    757                 msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value 
     756            except Exception as ex: 
     757                msg = "Invertor.from_file: corrupted file\n%s" % ex 
    758758                raise RuntimeError(msg) 
    759759        else: 
  • src/sas/sascalc/pr/num_term.py

    ra1b8fee r8f83719f  
    183183                data_y = np.append(data_y, test_y) 
    184184                data_err = np.append(data_err, err) 
    185             except: 
    186                 logger.error(sys.exc_value) 
     185            except Exception as ex: 
     186                logger.error(ex) 
    187187 
    188188    return data_x, data_y, data_err 
Note: See TracChangeset for help on using the changeset viewer.