Getting spatially varying PSF from deepCoadd images

Hi all,

I’m working on a source injection pipeline for star cluster detection and need to extract PSF information from deepCoadd images at arbitrary pixel positions.

I’ve gone through the relevant tutorial but I’m running into an issue where the PSF parameters I get back at certain positions seem unphysical. For example FWHM values that are either extremely large, extremely small, or discontinuous relative to neighboring positions.

A few specific questions:

  1. Is the deepCoadd PSF guaranteed to be well-defined at every pixel position?, or are there known regions (e.g. near patch/tract boundaries, bright star halos, or masked regions) where getPsf().computeImage(Point2D(x, y)) returns unreliable results?
  2. Is there a recommended way to validate PSF measurements across the image e.g. sampling on a grid and flagging outliers before using the PSF for convolution?
  3. For injection purposes, is it better to use the spatially-varying PSF evaluated at each injection position, or to use a single representative PSF (e.g. evaluated at the image centre)?

My current code looks like this:

from lsst.geom import Point2D

psf = exposure.getPsf()

psf_image = psf.computeImage(Point2D(x, y))

psf_array = psf_image.array

psf_fwhm = psf.computeShape(Point2D(x, y)).getDeterminantRadius() * 2.355

Any guidance on whether there are known edge cases or a more robust approach would be really appreciated. Thanks!

In reply to 3), I’d strongly recommend using the PSF evaluated at the coordinates of your synthetic source.

If you make use of the Star class in your input injection catalog, source_injection tools will automatically inject the PSF computed at the coordinates of your source for you.

Regarding 1), the mask planes provide information about data quality, including the PSF model. For example, for deep_coadds, there is INEXACT_PSF, although other planes might also affect.

As for 2), I would think that validating the PSF model depends on the science goals and requirements. My experience is related to cosmic shear and cluster lensing, in which case some examples of tests and diagnostics (like correlation statistics) can be found in the following: