match_photutils#

niriss_tools.isophotal.match_photutils(source_psf, target_psf, out_path=None, window=<photutils.psf.matching.windows.CosineBellWindow object>, oversample=3)[source]#

Create a PSF-matching kernel using photutils.

Parameters:
source_psfArrayLike | PathLike

The source point spread function (PSF), passed as either an array or a path to a FITS file.

target_psfArrayLike | PathLike

The target PSF, which should be broader than the source. The shape and pixel scale of source_psf and target_psf must match.

out_pathPathLike | None, optional

The path to which the output kernel should be saved. If None (default), the kernel will not be written to a file.

windowCallable | None, optional

The window function to filter high-frequency noise, by default 5). For further details see create_matching_kernel.

oversampleint, optional

The factor by which the source and target PSF should be oversampled before computing the matching kernel, using scipy.ndimage.zoom. By default, oversample=3.

Returns:
ArrayLike

The homogenisation kernel. When convolved with source_psf, this should reproduce target_psf.