How to compute PSF Image/kernel Image without background noise

Hi

I’m trying to compute the local PSF of a calexp in order to perform a quick-and-dirty injection of transients. However, whenever I try to use the methods computeKernelImage() and computeImage(), I obtain the shape of the PSF with background noise. Is there a way to remove the noise from the image?

This is the typical result I get from using the methods. I’m working on CFHT calexps.

I don’t understand what you’re looking for. That’s a pixel-based PSF model, and there is no way to remove the noise. Are you looking for a model fit – it’ll have noise too, but you may not notice!

@jbosch has some code somewhere to do a shapelet fit to the PSF model (we use it in the cmodel code); would that help?

That could help. I decided to use the Quadrupole parameters to create a gaussian approximation based on the psf parameters… but that could also help as well.