XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Team:
Data Access and Database

## Description

We should add metadata readers with object constructors as per DM-9060 for a few more Exposure components:

• filter: afw.image.Filter has a PropertyList constructor, so the exact same pattern used for Calib, Wcs, and VisitInfo ought to work. There's also a CameraMapper._setFilter method that seems to provide some sort of fall-back implementation; I'm not sure how that gets invoked.
• bbox: All the information we need to construct an afw.geom.Box2I is in the metadata PropertyList, but there's no existing function to create one from a PropertyList, and in this case there it wouldn't be appropriate to add it as a constructor, I think. We should add a free function to do this to afw::geom (in Python would probably be fine). We can get width and height from the NAXIS1 and NAXIS2 keys, respectively, and the minimum point from lsst.afw.image.getImageXY0FromMetadata.
• detector: CameraMapper already does some magic to attach a Detector object to many Exposure datasets. I'm not sure what invokes it, but the relevant implementation for calexp seems to be in CameraMapper._setCcdDetector; there's at least one other implementation for other Exposure datasets that correspond to an amplifier rather than a CCD, and there are also some Exposure datasets for which there is no detector. Ideally we'd like to have <dataset>_detector do the same thing as the code that attaches all of those to full-Exposure loads, but the priority is probably getting calexp_detector working.

## Activity

Hide
Paul Price added a comment -

I don't think _detector is hard.

Show
Paul Price added a comment - _filter has already been added. I don't think _detector is hard.
Hide
Paul Price added a comment -

John Parejko, could you please review this addition of _detector?

 price@pap-laptop:~/LSST/obs_base (tickets/DM-9153=) $git sub commit 9dfcbd96b412bbf1ec458de1a2840331a0fa6a8b Author: Paul Price  Date: Thu Jul 20 13:13:37 2017 -0400    Add _detector dataset    Pulls the detector from the camera object stored in the CameraMapper.    python/lsst/obs/base/cameraMapper.py | 15 +++++++++++++++  tests/testCameraMapper.py | 8 +++++++-  2 files changed, 22 insertions(+), 1 deletion(-)  Show Paul Price added a comment - John Parejko , could you please review this addition of _detector ? price@pap-laptop:~/LSST/obs_base (tickets/DM-9153=)$ git sub commit 9dfcbd96b412bbf1ec458de1a2840331a0fa6a8b Author: Paul Price <price@astro.princeton.edu> Date: Thu Jul 20 13:13:37 2017 -0400   Add <exposure>_detector dataset Pulls the detector from the camera object stored in the CameraMapper.   python/lsst/obs/base/cameraMapper.py | 15 +++++++++++++++ tests/testCameraMapper.py | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-)
Hide
John Parejko added a comment -

Looks good. See comments on PR.

Show
John Parejko added a comment - Looks good. See comments on PR.
Hide
Paul Price added a comment -

Minor changes made as requested. Jenkins is running, and I'll merge when it's done.

Show
Paul Price added a comment - Minor changes made as requested. Jenkins is running, and I'll merge when it's done.
Hide
Paul Price added a comment -

Merged to master.

Thanks for the review, John.

Show
Paul Price added a comment - Merged to master. Thanks for the review, John.

## People

• Assignee:
Simon Krughoff
Reporter:
Jim Bosch
Reviewers:
John Parejko
Watchers:
Dominique Boutigny, Jim Bosch, John Parejko, Nate Pease, Paul Price, Simon Krughoff