DM-55220: add more components when rewriting difference images#1323
Open
TallJimbo wants to merge 4 commits into
Open
DM-55220: add more components when rewriting difference images#1323TallJimbo wants to merge 4 commits into
TallJimbo wants to merge 4 commits into
Conversation
b43ee8f to
92aa5de
Compare
92aa5de to
efbaa21
Compare
This needs to be fixed before we ever run this on any non-LSSTCam data.
efbaa21 to
f8fdfdb
Compare
isullivan
approved these changes
Jun 22, 2026
isullivan
left a comment
Contributor
There was a problem hiding this comment.
A couple imports appear to be missing.
| deferLoad=True, # So we can pass preserve_quantization=True as a parameter. | ||
| doc="The input image to convert.", | ||
| ) | ||
| template_psf = cT.Input( |
Contributor
There was a problem hiding this comment.
A pet peeve, which is really beyond the scope of this ticket: I really don't like the abbreviation of cT or ct for connectionTypes, since it leads to confusing errors if the code is imported in analysis_tools that have metrics with units ct. I know cT shouldn't actually conflict, so I'm not requesting you change the style here.
| inputs = butlerQC.get(inputRefs) | ||
| difference_image = inputs.pop("legacy_exposure").get(parameters={"preserve_quantization": True}) | ||
| visit_summary = inputs.pop("visit_summary") | ||
| coadd_data_ids_by_uuid = {h.ref.id: h.ref.dataId for h in inputs.pop("template_coadds")} |
Contributor
There was a problem hiding this comment.
Minor point, but perhaps the type template_coadds could be configurable.
| if getattr(future_cell_coadd, "_opaque_metadata", None) is None: | ||
| future_cell_coadd._opaque_metadata = FitsOpaqueMetadata() | ||
| primary_header = future_cell_coadd._opaque_metadata.headers.setdefault( | ||
| ExtensionKey(), astropy.io.fits.Header() |
Contributor
There was a problem hiding this comment.
I don't see astropy.io.fits imported
| primary_header.set("INSTRUME", "LSSTCam") | ||
| primary_header.set("ORIGIN", "NSF-DOE Vera C. Rubin Observatory") | ||
| primary_header.set("TELESCOP", "Rubin:Simonyi") | ||
| primary_header.set("DATE", astropy.time.Time.now().fits, "UTC date this HDU was written.") |
Contributor
There was a problem hiding this comment.
I don't see astropy.time imported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.