17 dummyVar = pexConfig.Field(doc=
'Dummy config variable, does nothing',
18 dtype=bool, default=
True)
22 """This task serves culls the source list to sources which overlap with fakes""" 27 ConfigClass = measAlg.SourceDetectionConfig
30 if self.negativeFlagKey
is not None and self.negativeFlagKey
not in table.getSchema():
31 raise ValueError(
"Table has incorrect Schema")
34 fpSets = self.detectFootprints(exposure=exposure, doSmooth=doSmooth, sigma=sigma,
38 mask = exposure.getMaskedImage().getMask()
39 fakebit = mask.getPlaneBitMask(
'FAKE')
40 fpPos = fpSets.positive.getFootprints()
42 for i_foot, foot
in enumerate(fpPos):
44 footTmp.intersectMask(mask, fakebit)
45 if footTmp.getArea() == foot.getArea():
46 removes.append(i_foot)
47 removes = sorted(removes, reverse=
True)
51 self.log.
info(
"Found %d sources near fake footprints" % len(fpPos))
53 fpSets.numPos = len(fpPos)
55 del fpSets.negative.getFootprints()[0:]
56 fpSets.negative =
None 60 table.preallocate(fpSets.numPos)
62 fpSets.positive.makeSources(sources)
64 return pipeBase.Struct(sources=sources, fpSets=fpSets)
def makeSourceCatalog(self, table, exposure, doSmooth=True, sigma=None, clearMask=True)
Fit spatial kernel using approximate fluxes for candidates, and solving a linear system of equations...