23 from __future__
import absolute_import, division, print_function
25 __all__ = [
"BasePsfDeterminerConfig",
"BasePsfDeterminerTask",
"psfDeterminerRegistry"]
31 from future.utils
import with_metaclass
35 """Configuration that is likely to be shared by all PSF determiners 37 This is fairly sparse; more fields can be moved here once it is clear they are universal. 39 kernelSize = pexConfig.Field(
40 doc=
"radius of the kernel to create, relative to the square root of the stellar quadrupole moments",
44 kernelSizeMin = pexConfig.Field(
45 doc=
"Minimum radius of the kernel",
49 kernelSizeMax = pexConfig.Field(
50 doc=
"Maximum radius of the kernel",
57 """!Base class for PSF determiners 59 Register all PSF determiners with the psfDeterminerRegistry using: 60 psfDeterminerRegistry.register(name, class) 64 ConfigClass = BasePsfDeterminerConfig
65 _DefaultName =
"psfDeterminer" 67 def __init__(self, config, schema=None, **kwds):
68 """Construct a PSF Determiner 70 @param[in] config an instance of pexConfig.Config that configures this algorithm 71 @param[in,out] schema an instance of afw.table.Schema used for sources; passing a 72 schema allows the determiner to reserve a flag field to mark stars 73 used in PSF measurement, but some PSF determiners ignore this argument 75 pipeBase.Task.__init__(self, config=config, **kwds)
79 """Determine a PSF model 81 @param[in] exposure exposure containing the psf candidates (lsst.afw.image.Exposure) 82 @param[in] psfCandidateList: a sequence of PSF candidates (each an 83 lsst.meas.algorithms.PsfCandidate); typically obtained by 84 detecting sources and then running them through a star selector 85 @param[in,out] metadata a place to save interesting items 88 - psf: the fit PSF; a subclass of lsst.afw.detection.Psf 89 - cellSet: the spatial cell set used to determine the PSF (lsst.afw.math.SpatialCellSet) 91 raise NotImplementedError(
"BasePsfDeterminerTask is abstract, subclasses must override this method")
94 psfDeterminerRegistry = pexConfig.makeRegistry(
95 doc=
"A registry of PSF determiners (subclasses of BasePsfDeterminerTask)",
def __init__(self, config, schema=None, kwds)
def determinePsf(exposure, psfCandidateList, metadata=None)
Base class for PSF determiners.