compare_psf_to_legacy#

lsst.images.tests.compare_psf_to_legacy(tc: TestCase, psf: PointSpreadFunction, legacy_psf: Any, points: YX[ndarray] | XY[ndarray] | None = None, expect_legacy_raise_on_out_of_bounds: bool = False) int#

Compare a PSF model object to its legacy interface.

Parameters#

tc

Test case object with assert methods to use.

psf

Point-spread function to test.

legacy_psf

Legacy lsst.afw.detection.Psf instance to compare with.

points

Points to evaluate the PSFs at. If not provided, the intersection of the PSF bounding boxes are used to generate points on a grid.

expect_legacy_raise_on_out_of_bounds

If True, expect legacy_psf to raise lsst.afw.detection.InvalidPsfError when evaluated at a position considered out-of-bounds by psf.

Returns#

int

The number of points actually tested.