def setUp(self): self.Mask = afwImage.Mask[afwImage.MaskPixel] # the class self.testMask = self.Mask(lsst.geom.Extent2I(300, 400), 0) # Store the default mask planes for later use maskPlaneDict = self.Mask().getMaskPlaneDict() self.defaultMaskPlanes = sorted(maskPlaneDict, key=maskPlaneDict.__getitem__) # reset so tests will be deterministic self.Mask.clearMaskPlaneDict() for p in ("CR", "BP"): self.Mask.addMaskPlane(p) self.region = lsst.geom.Box2I(lsst.geom.Point2I(100, 300), lsst.geom.Extent2I(10, 40)) self.subTestMask = self.Mask(self.testMask, self.region, afwImage.LOCAL) if False: self.pixelList = afwImage.listPixelCoord() for x in range(0, 300): for y in range(300, 400, 20): self.pixelList.push_back(afwImage.PixelCoord(x, y))
def setUp(self): self.Mask = afwImage.Mask[afwImage.MaskPixel] # the class self.testMask = self.Mask(lsst.geom.Extent2I(300, 400), 0) # Store the default mask planes for later use maskPlaneDict = self.Mask().getMaskPlaneDict() self.defaultMaskPlanes = sorted( maskPlaneDict, key=maskPlaneDict.__getitem__) # reset so tests will be deterministic self.Mask.clearMaskPlaneDict() for p in ("CR", "BP"): self.Mask.addMaskPlane(p) self.region = lsst.geom.Box2I(lsst.geom.Point2I(100, 300), lsst.geom.Extent2I(10, 40)) self.subTestMask = self.Mask( self.testMask, self.region, afwImage.LOCAL) if False: self.pixelList = afwImage.listPixelCoord() for x in range(0, 300): for y in range(300, 400, 20): self.pixelList.push_back(afwImage.PixelCoord(x, y))
def setUp(self): self.testMask = afwImage.MaskU(afwGeom.Extent2I(300, 400), 0) #self.testMask.set(0) self.testMask.clearMaskPlaneDict() # reset so tests will be deterministic for p in ("CR", "BP"): self.testMask.addMaskPlane(p) self.region = afwGeom.Box2I(afwGeom.Point2I(100, 300), afwGeom.Extent2I(10, 40)) self.subTestMask = afwImage.MaskU(self.testMask, self.region, afwImage.LOCAL) if False: self.pixelList = afwImage.listPixelCoord() for x in range(0, 300): for y in range(300, 400, 20): self.pixelList.push_back(afwImage.PixelCoord(x, y))
def setUp(self): self.Mask = afwImage.MaskU # the class self.testMask = self.Mask(afwGeom.Extent2I(300, 400), 0) self.testMask.clearMaskPlaneDict( ) # reset so tests will be deterministic for p in ("CR", "BP"): self.Mask.addMaskPlane(p) self.region = afwGeom.Box2I(afwGeom.Point2I(100, 300), afwGeom.Extent2I(10, 40)) self.subTestMask = self.Mask(self.testMask, self.region, afwImage.LOCAL) if False: self.pixelList = afwImage.listPixelCoord() for x in range(0, 300): for y in range(300, 400, 20): self.pixelList.push_back(afwImage.PixelCoord(x, y))