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
classInstallGaussianPsfTask(config=None, *, name=None, parentTask=None, log=None)

Install a Gaussian PSF model in an exposure...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(exposure)

Set exposure’s PSF to a simple PSF model...

See also

See the InstallGaussianPsfTask API reference for complete details.

Retargetable subtasks

No subtasks.

Configuration fields

fwhm

Default
3.5322300675464238
Field type

float Field

Estimated FWHM of simple Gaussian PSF model, in pixels. Ignored if input exposure has a PSF model.

width

Default
11
Field type

int RangeField

Range

[1,inf)

Width and height of PSF model, in pixels. Must be odd.

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
 center = exposure.getBBox().getCenter()
 measFwhm = exposure.getPsf().computeShape(center).getDeterminantRadius() * FwhmPerSigma
 assert abs(measFwhm - task.config.fwhm) < 1e-3