Ian and I took a look at this today with both his simulated images and some real HiTS images. Presently, when the template image is warped in difference imaging, the PSF is used as-provided and is not also warped in any way. So, we tried using WarpedPsf (from meas_algorithms) on the template PSF, exactly as it's implemented in pipe_tasks' WarpAndPsfMatchTask.
For simulated images, the result by eye is a significant improvement when the template has a finer pixel scale than the science image (this means the template image has a larger FWHM than the science image as measured in pixels). With no PSF warping, the diffims have large boxy halo residuals. With PSF warping, these halos disappear, but the chronic fingerprint/ringing signature is unaffected.
For real images, the result by eye is at least not worse. We think this is probably a second-order improvement while the main problem of the kernel fitting producing the fingerprint signatures dominates.
The next step is to figure out if this is an appropriate way to handle PSF warping for difference imaging templates. One test that could be done, for example, is generating a bunch of ellipsoidal PSFs and checking to see that they are properly rotated when warping is implemented.
It is worth noting that the code change we tried has been implemented in ip_diffim's zogy.py, so that supports it being a reasonable thing to do.
Ian and I took a look at this today with both his simulated images and some real HiTS images. Presently, when the template image is warped in difference imaging, the PSF is used as-provided and is not also warped in any way. So, we tried using WarpedPsf (from meas_algorithms) on the template PSF, exactly as it's implemented in pipe_tasks' WarpAndPsfMatchTask.
For simulated images, the result by eye is a significant improvement when the template has a finer pixel scale than the science image (this means the template image has a larger FWHM than the science image as measured in pixels). With no PSF warping, the diffims have large boxy halo residuals. With PSF warping, these halos disappear, but the chronic fingerprint/ringing signature is unaffected.
For real images, the result by eye is at least not worse. We think this is probably a second-order improvement while the main problem of the kernel fitting producing the fingerprint signatures dominates.
The next step is to figure out if this is an appropriate way to handle PSF warping for difference imaging templates. One test that could be done, for example, is generating a bunch of ellipsoidal PSFs and checking to see that they are properly rotated when warping is implemented.
It is worth noting that the code change we tried has been implemented in ip_diffim's zogy.py, so that supports it being a reasonable thing to do.