Skip to content

Commit

Permalink
Merge pull request #50 from lsst/tickets/DM-19015
Browse files Browse the repository at this point in the history
DM-19015: Fix reading fcr photoCalib
  • Loading branch information
parejkoj committed Apr 12, 2019
2 parents e2cdb14 + cb5be57 commit 1c75edc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/meas/mosaic/updateExposure.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def getFluxFitParams(dataRef):
ffpHeader = dataRef.get("fcr_hsc_md", immediate=True)
else:
ffpHeader = dataRef.get("fcr_md", immediate=True)
photoCalib = afwImage.makePhotoCalibFromMetadata(ffpHeader)
photoCalib = dataRef.get("fcr_photoCalib")
ffp = FluxFitParams(ffpHeader)

wcs = getWcs(dataRef)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_fluxFitBoundedField.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def setUp(self):
"%d/fcr-%07d-%03d.fits" % (self.tract, self.visit, ccd)
)
fcrMetadata = readMetadata(fcrFilename)
fcrPhotoCalib = lsst.afw.image.ExposureF(fcrFilename).getPhotoCalib()
self.ffp[ccd] = lsst.meas.mosaic.FluxFitParams(fcrMetadata)
wcsFilename = os.path.join(
DATA_DIR,
Expand All @@ -157,6 +158,7 @@ def setUp(self):
camera[ccd] = MockDetector(MockOrientation(nQuarter))
self.dataRefs[ccd] = MockDataRef(visit=self.visit, tract=self.tract, ccd=ccd)
self.dataRefs[ccd].put(fcrMetadata, "fcr_md", )
self.dataRefs[ccd].put(fcrPhotoCalib, "fcr_photoCalib")
self.dataRefs[ccd].put(self.wcs[ccd], "jointcal_wcs")
self.dataRefs[ccd].put(calexpMetadata, "calexp_md")
self.dataRefs[ccd].put(camera, "camera")
Expand Down

0 comments on commit 1c75edc

Please sign in to comment.