LegacyPointSpreadFunction#

class lsst.images.psfs.LegacyPointSpreadFunction(impl: Any, bounds: Bounds)#

Bases: PointSpreadFunction

A PSF model backed by a legacy lsst.afw.detection.Psf object.

Parameters#

impl

An lsst.afw.detection.Psf instance.

bounds

The pixel-coordinate region where the model can safely be evaluated.

Notes#

This wrapper is usable as-is on any lsst.afw.detection.Psf instance, but subclasses (e.g. PSFExWrapper) must be used for serialization.

Attributes Summary

bounds

The region where this PSF model is valid.

kernel_bbox

Bounding box of all images returned by compute_kernel_image.

legacy_psf

The backing lsst.afw.detection.Psf object.

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.

from_legacy(legacy_psf, bounds)

Make a PSF object from a legacy lsst.afw.detection.Psf instance.

Attributes Documentation

bounds#
kernel_bbox#
legacy_psf#

The backing lsst.afw.detection.Psf object.

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_image at 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 from_legacy(legacy_psf: Any, bounds: Bounds) LegacyPointSpreadFunction#

Make a PSF object from a legacy lsst.afw.detection.Psf instance.

Parameters#

legacy_psf

Legacy PSF object.

bounds

The region where this PSF model is valid.

Returns#

PointSpreadFunction

A PointSpreadFunction instance.

Notes#

This base class method is a factory dispatch function that automatically selects the right PointSpreadFunction subclass to use. When that is already known, a subclass from_legacy method can be called instead.