DM-55220: add more components when rewriting difference images - #1323
Conversation
efbaa21 to
f8fdfdb
Compare
isullivan
left a comment
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( |
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.
There was a problem hiding this comment.
I suspect anything in analysis_tools that uses counts should actually use electron (except maybe for HSC/DECam), because that's what we prefer for the pixel units coming out of the LSST ISR task.
| 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")} |
There was a problem hiding this comment.
Minor point, but perhaps the type template_coadds could be configurable.
There was a problem hiding this comment.
The dataset type name is, as is always the case for connecftions; this string is the internal name of the connection attribute.
| 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() |
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.") |
There was a problem hiding this comment.
I don't see astropy.time imported.
f8fdfdb to
6093dbf
Compare
This needs to be fixed before we ever run this on any non-LSSTCam data.
6093dbf to
45b6674
Compare
No description provided.