InstallGaussianPsfTask¶
InstallGaussianPsfTask installs a Gaussian PSF model in an exposure.
Processing summary¶
InstallGaussianPsfTask installs a Gaussian PSF model in an exposure, creating a new PSF with the same sigma and width if a PSF already exists for the exposure. If there is not a PSF model for the exposure, the sigma and width are taken from the config.
Python API summary¶
from lsst.meas.algorithms.installGaussianPsf import InstallGaussianPsfTask
- 
class
(config=None, name=None, parentTask=None, log=None)InstallGaussianPsfTask Install a Gaussian PSF model in an exposure. If the exposure already has a PSF model then the new model has the same sigma and size (width and height in pixels) of the existing model
...
- 
attribute
config Access configuration fields and retargetable subtasks.
- 
method
(exposure)run Set exposure’s PSF to a simple PSF model
...
See also
See the InstallGaussianPsfTask API reference for complete details.
Examples¶
from lsst.afw.image import ExposureF
from lsst.meas.algorithms.installGaussianPsf import InstallGaussianPsfTask, FwhmPerSigma
exposure = ExposureF(100, 100)
task = InstallGaussianPsfTask()
task.run(exposure=exposure)
 # This particular exposure had no PSF model to begin with, so the new PSF model
 # uses the config's FWHM. However, measured FWHM is based on the truncated
 # PSF image, so it does not exactly match the input
 measFwhm = exposure.getPsf().computeShape().getDeterminantRadius() * FwhmPerSigma
 assert abs(measFwhm - task.config.fwhm) < 1e-3