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

Make input optional for get_detection_mask #222

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading