1

I would like to use Galsim to simulate a set of galaxies convolved by PSFs.

The galaxies are simple double sersic profiles that I create using the Sersic class from galsim (and then Shear to introduce some ellipticity).

The PSFs I'like to use are pixellised images computed from Zemax or CodeV ray-tracing simulations. They have been computed on a grid corresponding to the detector surface. This surface is tilted wrt the chiefray so these PSFs already include the WCS distorsion of the detector tilt.

I would like to compute the PSF-convolved galaxies on the detector surface. A possible way would be :

  • to load the psf

psf = galsim.InterpolatedImage(galsim.Image(psf))

  • then convolve by the galaxy :

gal = galsim.Convolve(psf, gal)

  • then draw on the detector surface (with the tilt in the local_wcs):

gal_image = gal.drawImage(wcs=local_wcs)

I think that I am doing a mistake with the PSF beeing affected twice by the disrtorsion (the original tilt in the Zemax PSF + the local_wcs of the drwImage method). Are my worries correct ?

Shall I apply the local_wcs distortion to the original unconvolved galaxy (by applying a shear corresponding to the local_wcs) and then convolve by the psf and draw it on a non distorted wcs ? Would this correctly take in account the fact that my PSF is already distorted by the detector tilt ?

Zenoo
  • 12,670
  • 4
  • 45
  • 69
akira
  • 31
  • 6

1 Answers1

1

I have come across a possible solution and that would be to specify the local_wcs when loading the PSF :

psf = galsim.InterpolatedImage(galsim.Image(psf), wcs=local_wcs)

Would that we a correct fix ? Will galsim notice that it only needs to distort the galaxy and convolve by the PSF (and not un-distort the PSF, convolve the galaxy by the PSF and distort the convolved galaxy) ?

akira
  • 31
  • 6