FFT Vectorial PSF - 3D
This example demonstrates how to use the VectorialFFTPSF class to calculate the 3D PSF (through-focus) of an optical system.
Note: Vectorial PSF calculations are automatically performed when polarization is enabled in the optical system. This accounts for the vectorial nature of the electric field at the exit pupil.
[1]:
from optiland.psf import VectorialFFTPSF
from optiland.samples.objectives import TessarLens
from optiland.rays import create_polarization
[2]:
lens = TessarLens()
pol_state_H = create_polarization("H")
lens.updater.set_polarization(pol_state_H) # Enable polarization to trigger vectorial PSF
lens.draw()
[2]:
(<Figure size 1000x400 with 1 Axes>, <Axes: xlabel='Z [mm]', ylabel='Y [mm]'>)
[3]:
psf = VectorialFFTPSF(lens, field=(0, 1), wavelength=0.55, num_rays=256)
_ = psf.view(projection="3d")