reproject_and_convolve#
- niriss_tools.isophotal.reproject_and_convolve(ref_path, orig_images, psfs, out_dir, psf_target, oversample=3, save_unconvolved=True, new_wcs_kw=None, reproject_image_kw=None, psf_method='pypher', psf_match_kw=None, convolve_method='fft', new_names=None)[source]#
Align, reproject, and PSF match one or more images to a reference.
- Parameters:
- ref_path
PathLike The path of the image to use as a reference. All other images will be matched to the North-aligned reprojection of this image, at the same pixel scale.
- orig_images
PathLike|list[PathLike] The locations of one or more images, to be matched to the reference image.
- psfs
ArrayLike|PathLike|None|list[ArrayLike|PathLike|None] The corresponding PSF for each image in
orig_image. If any PSF isNone, the convolution step will be skipped for that image.- out_dir
PathLike The directory to which the output (reprojected and convolved) images will be written.
- psf_target
ArrayLike|PathLike The PSF to which all of the input images will be matched. In most circumstances, this will be the PSF of
ref_path, but it does not need to be (e.g. if matching to the resolution of a ground-based IFU).- oversample
int, 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.- save_unconvolvedbool, optional
Whether the reprojected (but unconvolved) images should also be saved, by default True.
- new_wcs_kw
dict|None, optional Any additional keyword arguments to pass through to
gen_new_wcs, by defaultNone.- reproject_image_kw
dict|None, optional Any additional keyword arguments to pass through to
reproject_image, by defaultNone.- psf_method{“pypher” or “photutils”}, optional
The method used to generate the PSF-matching homogenisation kernel, by default
"pypher".- psf_match_kw
dict|None, optional Any additional keyword arguments to pass through to
niriss_tools.isophotal.match_photutilsorniriss_tools.isophotal.match_pypher, depending onpsf_method. By default None.- convolve_method{“fft”, “direct”}, optional
The method used to convolve the reprojected images with the homogenisation kernel. By default
"fft".- new_names
str|list[str] |None, optional The new base names for each original image, by default
None.
- ref_path
- Returns:
list[PathLike]The paths corresponding to the convolved images.