-
Notifications
You must be signed in to change notification settings - Fork 9
DM-49344: Modify getDcrTemplateTask to use deferredDatasetHandles #394
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
Conversation
37d029f to
8649e9b
Compare
eigerx
left a comment
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.
Looks good! Only real comment is that if you could put linter edits on a separate commit next time (at least until after review) that would be swell. Thanks!!
| # interpolation length for WCS evaluations. | ||
| self.warp.interpLength = 100 | ||
| self.warp.warpingKernelName = 'lanczos3' | ||
| self.warp.warpingKernelName = "lanczos3" |
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.
Small comment, usually linter stuff is at least put on its own commit so reviewers can look at new additions only, but I'm glad you did it because this file clearly needed it!
| Record of the tract and patch of each coaddExposure. | ||
| coaddExposures : `dict` [`int`, `list` of \ | ||
| [`lsst.daf.butler.DeferredDatasetHandle` of \ | ||
| `lsst.afw.image.Exposure` or |
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.
lsst.afw.image.Exposure or lsst.afw.image.Exposure ? I assume there is a small typo
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.
Good question! It looks a bit odd since it's on two lines, but the first option is a DeferredDatasetHand of an lsst.afw.image.Exposure and the other option is just an lsst.afw.image.Exposure . I hope that clarifies things!
| dataId = coaddRef.dataId | ||
| patchWcs = skymap[dataId['tract']].getWcs() | ||
| patchBBox = skymap[dataId['tract']][dataId['patch']].getOuterBBox() | ||
| subfilter = dataId["subfilter"] |
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.
It looks like everything up till this point was linting and this is the meat of the PR, correct? let me know if I missed something above.
| patchCorners = patchWcs.pixelToSky(geom.Box2D(patchBBox).getCorners()) | ||
| patchPolygon = afwGeom.Polygon(wcs.skyToPixel(patchCorners)) | ||
| if patchPolygon.intersection(detectorPolygon): | ||
| overlappingArea += patchPolygon.intersectionSingle(detectorPolygon).calculateArea() |
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.
It looks like this line is the same? How did this used to work differently?
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.
Yes! This is the same line. The difference is when appending dataIds. Since we have three subfilters, we don't want to append the same dataId three times, so we only keep the one associated with subfilter=0. This is in line ~734.
aaa0ef9 to
8c4c57b
Compare
No description provided.