# Simulate a camera PSF?

Say I have a $$3D$$ object stored as a $$3D$$ $$\texttt{NumPy}$$ array in python. I want to view this $$3D$$ object as a camera would give: a particular aperture, focal length, etc. My understanding is I can blur each layer of this object by a certain amount by convoluting it with the camera's PSF. After blurring, all the slices can be summed together, resulting in a final image. The issue I am having is how to create this PSF, so it's $$3D$$ $$(x,y,z)$$. I see a lot of literature for deriving PSF for microscopes, but to my understanding, the PSF on a camera isn't symmetric across the focal plane; objects closer to the camera blur out faster. I wondered if anyone has come across a $$3D$$ PSF for a conventional camera or how about I could derive it myself?

• Are you familiar with Fourier analysis? What you want to do is Fourier optics. FWIW, Numpy has very good support for Fourier stuff. Sep 8, 2021 at 15:42
• Consider to spell out acronyms. Sep 8, 2021 at 17:10
• @PM2Ring it would be not easy to get a realistic PSF due to aperture (starburst effect), using DFT, if one wants HDR results: aliasing will result in "reflection" of the Fraunhofer diffraction pattern back into the image, spoiling the nice radial starburst effect. Though, maybe there are other ways to use Fourier transform for this purpose that won't have this problem... Sep 8, 2021 at 18:48
• @Ruslan Ah, good point. Sep 8, 2021 at 18:54
• I haven't tried it yet, but this open-access paper looks promising: James E. Harvey, Ryan G. Irvin, Richard N. Pfisterer, Modeling physical optics phenomena by complex ray tracing, Optical Engineering, 54(3), 035105 (2015). Sep 12, 2021 at 20:04