How do you simulate astigmatism and other zernike aberrations of an image? If I have a perfectly clear image, how do I simulate what this image would look like if there had been some sort of aberrations during image capture, specified by zernike polynomials?
For example how do I simulate astigmatism? Focusing can be simulated using convolution and deconvolution, but what about the other aberrations for the zernike polynomials?
For context, I just want to teach myself optics and computer graphics simulations by writing a program for this.
 A: what you see in the image is the point spread function (PSF) of your wavefront -- to some approximation, e.g. neglecting polarization the fourier transform of your wavefront.
If your wavefront is perfect (no aberrations) the PSF is the Airy disk which depends on the aperture.
In real applications the calculation of an aberrated image is not that simple as the wavefront usually varies accross the field and very often is not even circular for all field points due to vignetting.
If the wavefront of your optics varies very little with the field you can just take the fourier transform and do a convolution accross the image as you indicated already in you question.
If the wavefront varies a lot accross the field you need to apply the corresponding (field point dependent) PSF for each field point. Commercial optical design programs like ZEMAX or CodeV can do such image simulations given an optical lens design.
A: image formation through a lens system and pupil diffraction through that lens system can be modeled/simulated using convolution is because the system is approximated as being linear. This approximation is only valid in the paraxial limit and in the case of ideal lenses etc.
If the lenses have aberrations then there is no more a priori guarantee of linearity. This means it may be impossible to model/simulate an aberrated system using a simple aberration model. Likely you need to use a full ray tracing model.
A: Astigmatism in humans is a corneal curvature that shortens the image behind the lens in one direction. So if you reduce the image in one direction, you get what you want. The shortening is done in the image processing by a function called ScaleImage, for example, where you leave one coordinate at 100% and the other coordinate at a smaller value.
