Matching of two model Psfs, and application of the Psf-matching kernel to an input Exposure
Definition at line 94 of file modelPsfMatch.py.
lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask._buildCellSet |
( |
|
self, |
|
|
|
exposure, |
|
|
|
referencePsfModel |
|
) |
| |
|
protected |
Build a SpatialCellSet for use with the solve method
Parameters
----------
exposure : `lsst.afw.image.Exposure`
The science exposure that will be convolved; must contain a Psf
referencePsfModel : `lsst.afw.detection.Psf`
Psf model to match to
Returns
-------
result : `struct`
- ``kernelCellSet`` : a SpatialCellSet to be used by self._solve
- ``referencePsfModel`` : Validated and/or modified
reference model used to populate the SpatialCellSet
Notes
-----
If the reference Psf model and science Psf model have different dimensions,
adjust the referencePsfModel (the model to which the exposure PSF will be matched)
to match that of the science Psf. If the science Psf dimensions vary across the image,
as is common with a WarpedPsf, either pad or clip (depending on config.padPsf)
the dimensions to be constant.
Reimplemented from lsst.ip.diffim.psfMatch.PsfMatchTask.
Definition at line 206 of file modelPsfMatch.py.
lsst.ip.diffim.modelPsfMatch.ModelPsfMatchTask.run |
( |
|
self, |
|
|
|
exposure, |
|
|
|
referencePsfModel, |
|
|
|
kernelSum = 1.0 |
|
) |
| |
Psf-match an exposure to a model Psf
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Exposure to Psf-match to the reference Psf model;
it must return a valid PSF model via exposure.getPsf()
referencePsfModel : `lsst.afw.detection.Psf`
The Psf model to match to
kernelSum : `float`, optional
A multipicative factor to apply to the kernel sum (default=1.0)
Returns
-------
result : `struct`
- ``psfMatchedExposure`` : the Psf-matched Exposure.
This has the same parent bbox, Wcs, PhotoCalib and
Filter as the input Exposure but no Psf.
In theory the Psf should equal referencePsfModel but
the match is likely not exact.
- ``psfMatchingKernel`` : the spatially varying Psf-matching kernel
- ``kernelCellSet`` : SpatialCellSet used to solve for the Psf-matching kernel
- ``referencePsfModel`` : Validated and/or modified reference model used
Raises
------
RuntimeError
if the Exposure does not contain a Psf model
Definition at line 119 of file modelPsfMatch.py.