diff --git a/python/lsst/ip/diffim/subtractImages.py b/python/lsst/ip/diffim/subtractImages.py index bc7d5262..12524628 100644 --- a/python/lsst/ip/diffim/subtractImages.py +++ b/python/lsst/ip/diffim/subtractImages.py @@ -246,10 +246,8 @@ def setDefaults(self): self.makeKernel.kernel.active.fitForBackground = self.doSubtractBackground self.makeKernel.kernel.active.spatialKernelOrder = 1 self.makeKernel.kernel.active.spatialBgOrder = 2 - self.sourceSelector.doUnresolved = True # apply star-galaxy separation - self.sourceSelector.doIsolated = True # apply isolated star selection - self.sourceSelector.doRequirePrimary = True # apply primary flag selection - self.sourceSelector.doSkySources = False # Do not include sky sources + self.sourceSelector.doFlags = True + self.sourceSelector.flags.good = ["calib_psf_used",] self.sourceSelector.doSignalToNoise = True # apply signal to noise filter self.sourceSelector.signalToNoise.minimum = 10 self.sourceSelector.signalToNoise.maximum = 500 diff --git a/python/lsst/ip/diffim/utils.py b/python/lsst/ip/diffim/utils.py index 0dc9a454..6f58f970 100644 --- a/python/lsst/ip/diffim/utils.py +++ b/python/lsst/ip/diffim/utils.py @@ -1295,6 +1295,7 @@ def _makeTruthSchema(): schema.addField("base_ClassificationSizeExtendedness_value", "Flag", "testing flag.") schema.addField("deblend_nChild", "Flag", "testing flag.") schema.addField("detect_isPrimary", "Flag", "testing flag.") + schema.addField("calib_psf_used", "Flag", "testing flag.") schema.getAliasMap().set("slot_Centroid", "truth") schema.getAliasMap().set("slot_CalibFlux", "truth") schema.getAliasMap().set("slot_ApFlux", "truth") @@ -1335,6 +1336,7 @@ def _fillTruthCatalog(injectList): record["base_ClassificationSizeExtendedness_value"] = 0 record["deblend_nChild"] = 0 record["detect_isPrimary"] = True + record["calib_psf_used"] = True return catalog