Skip to content
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

Exception behavior. #75

Open
fockez opened this issue Apr 12, 2020 · 1 comment
Open

Exception behavior. #75

fockez opened this issue Apr 12, 2020 · 1 comment

Comments

@fockez
Copy link

fockez commented Apr 12, 2020

I want to use sep in my pipeline, but sometimes I met exceptions, such as object deblending overflow and invalid aperture parameters. Is that possible to skip the expcetion and just output the exception details to debug, and still output all other correct results? In fact, most exception comes from some defects in the image, and most of the image is fine.
I tried a lot to find what part cause the deblending overflow, but too hard. I use the subtracted images for detection.
If there is an internal config for exception behavior, that great.
Thanks.

@kbarbary
Copy link
Owner

kbarbary commented May 9, 2020

There currently is no configuration to control this. SEP is purposefully more pedantic about exceptions than Source Extractor. There are several places where Source Extractor will happily continue through the image and just write garbage results for an object with some flag set, whereas SEP raises an exception. However, I can definitely see how it would sometimes be more convenient to have the Source Extractor-like behavior.

I unfortunately don't have time to implement this, but I'd accept a PR. For deblending, there are two places where status is set to DEBLEND_OVERFLOW in https://github.com/kbarbary/sep/blob/master/src/deblend.c. One would have to implement alternative behavior in those two places, and decide which path to take based on some boolean value that gets passed down from extract (or alternatively, a global value). I'm not sure what the alternative behavior would be though -- might be good to look at the SourceExtractor codebase to see what it does in this case.

For "invalid aperture parameters", it would be good to know what the specific problem is. It might be a bug or a behavior that could be modified without a switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants