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-11326: CameraMapper: add <exposure>_dims dataset #54
Conversation
python/lsst/obs/base/cameraMapper.py
Outdated
md = afwImage.readMetadata(location.getLocationsWithRoot()[0]) | ||
return afwGeom.Extent2I(md.get("NAXIS1"), md.get("NAXIS2")) | ||
setMethods("dims", bypassImpl=dimsBypass) | ||
|
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.
Can you move the setMethods
call outside of the if...elif
block?
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.
No, they're different.
Instead of |
Good idea. New implementation to come soon.... |
fb85468
to
2b033f3
Compare
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.
One comment on variable names.
Question: this should work for dataRef.get('calexp_bbox
)`?
python/lsst/obs/base/cameraMapper.py
Outdated
@@ -423,6 +423,15 @@ def setMethods(suffix, mapImpl=None, bypassImpl=None, queryImpl=None): | |||
bypassImpl=lambda datasetType, pythonType, location, dataId: | |||
afwImage.Filter( | |||
afwImage.readMetadata(location.getLocationsWithRoot()[0]))) | |||
setMethods("bbox", bypassImpl=lambda dsType, pyType, location, dataId: |
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.
All of the examples above use datasetType
and pythonType
: that's better than an unnecessary abbreviation. And the same below.
2b033f3
to
5cf4777
Compare
Fixed the variable names. Yes, this should allow you to do |
This allows the user to retrieve the bounding box of an image without retrieving the image itself, or assuming it's FITS under the covers.
5cf4777
to
aa8612d
Compare
This allows the user to retrieve the size of an image without
retrieving the image itself, or assuming it's FITS under the
covers.