Through Focus MTF

This functionality provides the means to compute the MTF at a target spatial frequency as a function of defocus. The calculation is performed at several defocus positions, then spline interpolation is used to smooth the curves when plotting.

[1]:
from optiland.samples.objectives import ReverseTelephoto
from optiland.analysis import ThroughFocusMTF
[2]:
optic = ReverseTelephoto()
optic.draw()
[2]:
(<Figure size 1000x400 with 1 Axes>, <Axes: xlabel='Z [mm]', ylabel='Y [mm]'>)
../../_images/gallery_wavefront_through_focus_mtf_2_1.png
[3]:
tf_mtf = ThroughFocusMTF(
    optic=optic,
    spatial_frequency=50,
    delta_focus=0.1,
    num_steps=5,
    fields="all",
    wavelength="primary",
    num_rays=128,
)
tf_mtf.view()
[3]:
(<Figure size 1200x400 with 1 Axes>,
 <Axes: title={'center': 'Through-Focus MTF at 50 cycles/mm, λ=0.588 µm'}, xlabel='Defocus (mm)', ylabel='MTF'>)
../../_images/gallery_wavefront_through_focus_mtf_3_1.png