Skip to content

Commit

Permalink
Use ExposureFitsReader to read VisitInfo and Filter metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Mar 16, 2019
1 parent f44524e commit 0947555
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions python/lsst/obs/base/cameraMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,19 @@ def getSkyWcs(datasetType, pythonType, location, dataId):

setMethods("calib", bypassImpl=lambda datasetType, pythonType, location, dataId:
afwImage.Calib(readMetadata(location.getLocationsWithRoot()[0])))
setMethods("visitInfo",
bypassImpl=lambda datasetType, pythonType, location, dataId:
afwImage.VisitInfo(readMetadata(location.getLocationsWithRoot()[0])))
setMethods("filter",
bypassImpl=lambda datasetType, pythonType, location, dataId:
afwImage.Filter(readMetadata(location.getLocationsWithRoot()[0])))

def getVisitInfo(datasetType, pythonType, location, dataId):
fitsReader = afwImage.ExposureFitsReader(location.getLocationsWithRoot()[0])
return fitsReader.readVisitInfo()

setMethods("visitInfo", bypassImpl=getVisitInfo)

def getFilter(datasetType, pythonType, location, dataId):
fitsReader = afwImage.ExposureFitsReader(location.getLocationsWithRoot()[0])
return fitsReader.readFilter()

setMethods("filter", bypassImpl=getFilter)

setMethods("detector",
mapImpl=lambda dataId, write=False:
dafPersist.ButlerLocation(
Expand Down

0 comments on commit 0947555

Please sign in to comment.