23 __all__ = (
"FlaggedStarSelectorConfig",
"FlaggedStarSelectorTask")
25 import lsst.pex.config
29 from .starSelector
import BaseStarSelectorTask, starSelectorRegistry
33 field = lsst.pex.config.Field(
34 dtype=str, default=
"calib_psfUsed",
35 doc=
"Name of a flag field that is True for stars that should be used." 41 A trivial StarSelector that simply uses an existing flag field to filter a SourceCatalog. 43 This is most frequently used in steps that occur after the a PSF model has 44 been built, to allow other procedures that need stars to use the set of 45 stars used to determine the PSF. 49 ConfigClass = FlaggedStarSelectorConfig
52 BaseStarSelectorTask.__init__(self, schema=schema, **kwds)
53 self.
key = schema.find(self.config.field).key
56 starCat = lsst.afw.table.SourceCatalog(sourceCat.table)
57 for record
in sourceCat:
58 if record.get(self.
key):
59 starCat.append(record)
60 return lsst.pipe.base.Struct(starCat=starCat)
63 starSelectorRegistry.register(
"flagged", FlaggedStarSelectorTask)
Base class for star selectors.
def selectStars(self, exposure, sourceCat, matches=None)
A trivial StarSelector that simply uses an existing flag field to filter a SourceCatalog.
def __init__(self, schema, kwds)