Skip to content

DM-56879: record templateInputs and compute DiaSource template MJD - #481

Open
isullivan wants to merge 2 commits into
mainfrom
tickets/DM-56879
Open

isullivan wants to merge 2 commits into
mainfrom
tickets/DM-56879

Conversation

@isullivan

Copy link
Copy Markdown
Contributor

No description provided.

@BrunoSanchez
BrunoSanchez self-requested a review November 3, 2026 07:38

@BrunoSanchez BrunoSanchez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good.
I was able to follow the code, however a discussion could help me understand some of the details on the polygons, and on the template info stored in the diaSources metadata.

inputBounds = Box.from_legacy(record.getBBox()) if polygon is None else Polygon.from_legacy(polygon)
inputToCoadd = _pixelTransform(record.getWcs(), coaddWcs)
try:
footprint = (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this line? I am not sure I follow exactly how it is chaining the transforms and intersections.

Comment on lines +113 to +123
record : `lsst.afw.table.ExposureRecord`
Input record of a coadd, with the input's WCS, bounding box and
optional valid polygon.
coaddWcs : `lsst.afw.geom.SkyWcs`
WCS of the coadd.
scienceInCoadd : `lsst.images.Polygon`
``scienceBox`` in coadd pixels.
coaddToScience : `lsst.images.Transform`
Transform from coadd pixels to science image pixels.
scienceBox : `lsst.images.Box`
Bounding box of the science image.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a few words here to clarify that the "coaddWcs" and input wcs are different, as the coaddWcs and all related to coadd is defined in the skymap of choice.
It is just to clarify to the user that the transformation here needed is not only inputs to science and its inverse, but also to the "coadd" sky coordinates

Each input's overlap with the science image is found in coadd pixels,
so no detector WCS is evaluated far outside its own image. The border
of each coadd input's bbox is trimmed to account for the size of the
warping kernel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants