PiffWrapper#
- class lsst.images.psfs.PiffWrapper(impl: piff.PSF, bounds: Bounds, stamp_size: int)#
Bases:
PointSpreadFunctionA PSF model backed by the Piff library.
Parameters#
- impl
The Piff PSF object to wrap.
- bounds
The pixel-coordinate region where the model can safely be evaluated.
Attributes Summary
The region where this PSF model is valid.
Bounding box of all images returned by
compute_kernel_image.The backing
piff.PSFobject.Methods Summary
compute_kernel_image(*, x, y)Evaluate the PSF model into an image suitable for convolution.
compute_stellar_bbox(*, x, y)Return the bounding box of the image that would be returned by
compute_stellar_image.compute_stellar_image(*, x, y)Evaluate the PSF model into an image suitable for comparison with the image of an astrophysical point source.
deserialize(model, archive)Deserialize the PSF from an archive.
from_legacy(legacy_psf, bounds)Make a PSF object from a legacy
lsst.afw.detection.Psfinstance.serialize(archive)Serialize the PSF to an archive.
Attributes Documentation
- bounds#
- kernel_bbox#
- piff_psf#
The backing
piff.PSFobject.This is an internal object that must not be modified in place.
Methods Documentation
- compute_kernel_image(*, x: float, y: float) Image#
Evaluate the PSF model into an image suitable for convolution.
Parameters#
- x
Column position coordinate to evaluate at.
- y
Row position coordinate to evaluate at.
Returns#
- Image
An image of the PSF, centered on the center of the center pixel, which is defined to be
(0, 0)by the image’s origin.
- compute_stellar_bbox(*, x: float, y: float) Box#
Return the bounding box of the image that would be returned by
compute_stellar_image.Parameters#
- x
Column position coordinate to evaluate at.
- y
Row position coordinate to evaluate at.
Returns#
- Box
The bounding box of the image that would be returned by
compute_stellar_imageat the given point.
- compute_stellar_image(*, x: float, y: float) Image#
Evaluate the PSF model into an image suitable for comparison with the image of an astrophysical point source.
Parameters#
- x
Column position coordinate to evaluate at.
- y
Row position coordinate to evaluate at.
Returns#
- Image
An image of the PSF, centered on the given coordinates, just like the postage stamp of a star would be.
- classmethod deserialize(model: PiffSerializationModel, archive: InputArchive[Any]) PiffWrapper#
Deserialize the PSF from an archive.
This method is intended to be usable as the callback function passed to
serialization.InputArchive.deserialize_pointer.
- classmethod from_legacy(legacy_psf: Any, bounds: Bounds) PiffWrapper#
Make a PSF object from a legacy
lsst.afw.detection.Psfinstance.Parameters#
- legacy_psf
Legacy PSF object.
- bounds
The region where this PSF model is valid.
Returns#
- PointSpreadFunction
A
PointSpreadFunctioninstance.
Notes#
This base class method is a factory dispatch function that automatically selects the right
PointSpreadFunctionsubclass to use. When that is already known, a subclassfrom_legacymethod can be called instead.
- serialize(archive: OutputArchive[Any]) PiffSerializationModel#
Serialize the PSF to an archive.
This method is intended to be usable as the callback function passed to
serialization.OutputArchive.serialize_directorserialization.OutputArchive.serialize_pointer.