Yash-10/galmask

Prevent `photutils` warning on deblending mode

Yash-10 opened this issue · 1 comments

If the source has negative values, the deblending procedure from photutils outputs warnings like this:

WARNING: Source "2" contains negative values, setting deblending mode to "linear" [photutils.segmentation.deblend]

It would be helpful to handle such situations within galmask itself to prevent long, verbose warning messages.

Eg:

if np.any(source < 0):
    # set deblending mode to linear
else:
    # keep it as default

I think this could be a non-issue. Is it helpful to explicitly see what deblending mode is set? If yes, we should close this, else tackle this..