Skip to content

Commit

Permalink
Make input optional for get_detection_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkannawadi committed Oct 3, 2024
1 parent 4d97e61 commit b8afcdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metadetect/lsst/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def get_stats_mask(exp):
return stats_mask


def get_detection_mask(exp):
def get_detection_mask(exp=None):
"""
Get a mask for detection. Regions with these flags set will not be searched
for objects.
Expand All @@ -838,7 +838,7 @@ def get_detection_mask(exp):
Parameters
----------
exp: lsst.afw.image.ExposureF
exp: lsst.afw.image.ExposureF, optional
The exposure
Returns
Expand All @@ -848,7 +848,7 @@ def get_detection_mask(exp):

mask = ['EDGE', 'NO_DATA']

if 'BRIGHT' in exp.mask.getMaskPlaneDict():
if exp is not None and 'BRIGHT' in exp.mask.getMaskPlaneDict():
mask += ['BRIGHT']

return mask
Expand Down

0 comments on commit b8afcdb

Please sign in to comment.