Skip to content

Commit

Permalink
Merge pull request #60 from lsst/tickets/DM-19373
Browse files Browse the repository at this point in the history
DM-19373: Use the new Defects class
  • Loading branch information
timj committed Apr 25, 2019
2 parents a7a954c + 0acff1e commit 2d25786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/obs/cfht/megacamMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
from astropy.io import fits

import lsst.afw.geom as afwGeom
import lsst.afw.image as afwImage
import lsst.afw.image.utils as afwImageUtils
import lsst.meas.algorithms as measAlg

from lsst.daf.persistence import Policy
from lsst.obs.base import CameraMapper, exposureFromImage
Expand Down Expand Up @@ -109,13 +109,13 @@ def bypass_defects(self, datasetType, pythonType, butlerLocation, dataId):
if str(hdu.header["SERIAL"]) != ccdSerial:
continue

defectList = []
defectList = measAlg.Defects()
for data in hdu.data:
bbox = afwGeom.Box2I(
afwGeom.Point2I(int(data['x0']), int(data['y0'])),
afwGeom.Extent2I(int(data['width']), int(data['height'])),
)
defectList.append(afwImage.DefectBase(bbox))
defectList.append(bbox)
return defectList

raise RuntimeError("No defects for ccdSerial %s in %s" % (ccdSerial, defectsFitsPath))
Expand Down

0 comments on commit 2d25786

Please sign in to comment.