ebachelet / pyLIMA

GNU General Public License v3.0
31 stars 8 forks source link

Add exceptions module to PyLIMA #89

Open rachel3834 opened 3 months ago

rachel3834 commented 3 months ago

PyLIMA's internal error checking is really great for robust fitting but there are occasions when this causes a fit process to end prematurely. This is fine, but in these circumstances, it would be really helpful if PyLIMA had an exceptions module which could then be imported in to fitting pipelines to improve their handling of exceptional cases.

Here's an example of this use-case:

I have a wrapper code which uses PyLIMA to run automated modeling of a set of events. In a few rare cases, PyLIMA's functions for eliminating bad data in the input lightcurves results in one or more lightcurves that are empty. This causes pyLIMA to halt the model fit, rightly.
I would like to be able to import a PyLIMA exceptions model so that I can add a specific try-except clause to catch these cases, without having to make it so broad as to catch every exception, which would tend to mask other issues.

ebachelet commented 1 month ago

Agree but this will take time