PiffWrapper#

class lsst.images.psfs.PiffWrapper(impl, bounds, stamp_size)#

Bases: PointSpreadFunction

A PSF model backed by the Piff library.

Parameters:
  • impl (PSF) – The Piff PSF object to wrap.

  • bounds (Bounds) – The pixel-coordinate region where the model can safely be evaluated.

  • stamp_size (int) – Side length in pixels of the PSF image stamps drawn by the model.

Attributes Summary

bounds

The region where this PSF model is valid.

kernel_bbox

Bounding box of all images returned by compute_kernel_image.

piff_psf

The backing piff.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.

serialize(archive)

Serialize the PSF to an archive.

to_legacy()

Convert to a legacy lsst.meas.extensions.piff.piffPsf.

Attributes Documentation

bounds#
kernel_bbox#
piff_psf#

The backing piff.PSF object.

This is an internal object that must not be modified in place.

Methods Documentation

compute_kernel_image(*, x, y)#

Evaluate the PSF model into an image suitable for convolution.

Parameters:
  • x (float) – Column position coordinate to evaluate at.

  • y (float) – Row position coordinate to evaluate at.

Returns:

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.

Return type:

Image

compute_stellar_bbox(*, x, y)#

Return the bounding box of the image that would be returned by compute_stellar_image.

Parameters:
  • x (float) – Column position coordinate to evaluate at.

  • y (float) – Row position coordinate to evaluate at.

Returns:

The bounding box of the image that would be returned by compute_stellar_image at the given point.

Return type:

Box

compute_stellar_image(*, x, y)#

Evaluate the PSF model into an image suitable for comparison with the image of an astrophysical point source.

Parameters:
  • x (float) – Column position coordinate to evaluate at.

  • y (float) – Row position coordinate to evaluate at.

Returns:

An image of the PSF, centered on the given coordinates, just like the postage stamp of a star would be.

Return type:

Image

classmethod from_legacy(legacy_psf, bounds)#

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

Parameters:
  • legacy_psf (TypeAliasType) – Legacy PSF object.

  • bounds (Bounds) – The region where this PSF model is valid.

Returns:

The converted PSF object.

Return type:

PointSpreadFunction

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.

serialize(archive)#

Serialize the PSF to an archive.

This method is intended to be usable as the callback function passed to serialization.OutputArchive.serialize_direct or serialization.OutputArchive.serialize_pointer.

Parameters:

archive (OutputArchive[Any]) – Archive to write to.

Return type:

PiffSerializationModel

to_legacy()#

Convert to a legacy lsst.meas.extensions.piff.piffPsf.

Return type:

TypeAliasType

This page was last modified on .