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
DM-27929: refactor meas_extensions_scarlet and skip sky objects #38
Conversation
While implementing a fix to skip sky objects I noticed that there are a number of places where columns were not being appropriately updated. So this commit refactors ScarletDeblendTask to make it less likely that similar errors can occur in the future, and also adds tests to check that columns are being persisted properly. The major change is that now all of the source updates are occurring on the input (mergeDet) catalog, and only at the end are the single band catalogs created and updated with band specific information. An added benefit is that deblended sources have the same source ID across catalogs, and are also now continuous catalogs.
This task was missing tests to ensure that the appropriate output columns were being generated, and that their values are correct. So this commit adds some much needed testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor fixes/optional suggestions.
# Set the psf key based on whether or not the source was | ||
# deblended using the PointSource model. | ||
# This key is not that useful anymore since we now keep track of | ||
# `modelType`, but we continue to propagate it in case code downstream | ||
# is expecting it. | ||
src.set(self.psfKey, scarletSource.__class__.__name__ == "PointSource") | ||
src.set(self.modelTypeKey, scarletSource.__class__.__name__) | ||
# We set the runtime to zero so that summing up the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the runtime to zero as opposed to what? If you're zeroing out some overhead time, is there a way to add that up separately?
d2ad248
to
b850dbc
Compare
While implementing the code to skip sky sources, the goal of DM-27929, I discovered that inconsistencies in the way that primary sources are handled lead to columns in primary sources not being updated correctly. It has also been quite a while since meas_extensions_scarlet was first created and it needed a face-lift anyway, so this PR refactors meas_extensions_scarlet to do all of the deblending in the input (mergedDet) catalog to make sure that all of the sources have their flags set appropriately, then the band-dependent columns and footprints are set in individual catalogs that are copied from the original.