Test Utilities#

lsst.images.tests Package#

Functions#

arrays_to_legacy_points(x, y)

Convert arrays of x and y to a list of lsst.geom.Point2D.

assert_close(tc, a, b, **kwargs)

Test that two arrays, floats, or quantities are almost equal.

assert_images_equal(tc, a, b, *[, rtol, ...])

Assert that two images are equal or nearly equal.

assert_masked_images_equal(tc, a, b, *[, ...])

Assert that two masked images are equal or nearly equal.

assert_masks_equal(tc, a, b)

Assert that two masks are equal or nearly equal.

assert_projections_equal(tc, a, b[, ...])

Test that two Projection instances are equivalent.

check_astropy_wcs_interface(tc, wcs, ...[, ...])

Test an Astropy WCS instance against known arrays of pixel and sky coordinates.

check_projection(tc, projection, pixel_xy, ...)

Test a Projection instance against known arrays of pixel and sky coordinates.

check_transform(tc, transform, input_xy, ...)

Test Transform against known arrays of input and output points.

compare_field_to_legacy(tc, field, ...)

Test a Field object by comparing it to an equivalent lsst.afw.math.BoundedField.

compare_image_to_legacy(tc, image, legacy_image)

Compare an Image object to a legacy lsst.afw.image.Image object.

compare_mask_to_legacy(tc, mask, legacy_mask)

Compare a Mask object to a legacy lsst.afw.image.Mask object.

compare_masked_image_to_legacy(tc, ...[, ...])

Compare a MaskedImage object to a legacy lsst.afw.image.MaskedImage object.

compare_projection_to_legacy_wcs(tc, ...[, ...])

Test a Projection object by comparing it to an equivalent lsst.afw.geom.SkyWcs.

compare_psf_to_legacy(tc, psf, legacy_psf[, ...])

Compare a PSF model object to its legacy interface.

compare_visit_image_to_legacy(tc, ...[, ...])

Compare a VisitImage object to a legacy lsst.afw.image.Exposure object.

legacy_coords_to_astropy(legacy_coords)

Convert a list of lsst.geom.SpherePoint objects to an Astropy coordinate object.

legacy_points_to_xy_array(legacy_points)

Convert a list of lsst.geom.Point2D objects to an XY array.

make_random_projection(rng, pixel_frame, bbox)

Create a test projection with random parameters.

Classes#

RoundtripFits(tc, original[, storage_class])

A context manager for testing FITS-based serialization.

TemporaryButler([run])

Make a temporary butler repository.