22__all__ = [
"BasePsfDeterminerConfig",
"BasePsfDeterminerTask",
"psfDeterminerRegistry"]
31 """Configuration that is likely to be shared by all PSF determiners
33 This is fairly sparse; more fields can be moved here once it
is clear they are universal.
35 stampSize = pexConfig.Field[int](
36 doc="Size of the postage stamp (in native pixels) to render the PSF model. Should be odd.",
39 check=
lambda x: (x > 0) & (x % 2 == 1),
44 """Base class for PSF determiners
46 Register all PSF determiners with the psfDeterminerRegistry using:
47 psfDeterminerRegistry.register(name,
class)
51 config : `lsst.pexConfig.Config`
52 Input
for configuring the algorithm
54 Schema used
for sources; passing a schema allows the
55 determiner to reserve a flag field to mark stars used
in
56 PSF measurement, but some PSF determiners ignore this argument.
60 ConfigClass = BasePsfDeterminerConfig
61 _DefaultName =
"psfDeterminer"
63 def __init__(self, config, schema=None, **kwds):
64 pipeBase.Task.__init__(self, config=config, **kwds)
67 def determinePsf(self, exposure, psfCandidateList, metadata=None, flagKey=None):
68 """Determine a PSF model.
72 exposure : `lsst.afw.Exposure`
73 Exposure containing the psf candidates.
75 A sequence of PSF candidates; typically obtained by
76 detecting sources and then running them through a star
78 metadata : `str`, optional
79 A place to save interesting items.
81 Schema key used to mark sources actually used
in PSF determination.
88 The spatial cell set used to determine the PSF
90 raise NotImplementedError(
"BasePsfDeterminerTask is abstract, subclasses must override this method")
93psfDeterminerRegistry = pexConfig.makeRegistry(
94 doc=
"A registry of PSF determiners (subclasses of BasePsfDeterminerTask)",
Class stored in SpatialCells for spatial Psf fitting.
__init__(self, config, schema=None, **kwds)
determinePsf(self, exposure, psfCandidateList, metadata=None, flagKey=None)