-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch runtime errors when smoothing spectra #65
Catch runtime errors when smoothing spectra #65
Conversation
Hi Kris, thanks for this PR. One of my future goals is to replace all generic If it is a Thanks 😉 |
Claudio,
If you want, I can try running it again on one of the problematic cases to see if it gets caught with |
Yes, please. In principle, that should work with The idea behind handling specific errors is to more easily discover unexpected ones when they occur 😉 |
OK, I will test. |
It works, the exception gets caught. Shall I commit or are you going to replace generic exceptions in a separate branch? |
Please commit! |
…rors in _build_spectrum function.
Done! |
Merged! Also, rebased |
* Catch runtime errors when smoothing spectrum in _build_spectrum function. * Replaced generic Exception with ValueError when catching smoothing errors in _build_spectrum function.
Small fix to avoid program ending when a runtime error occurs during smoothing of a spectrum.
I ran into this problem when running sourcespec on > 200 earthquakes.
It should be easy to propagate this fix to v2 as well.