optiland.mtf.base
Base Modulation Transfer Function (FFTMTF) Module.
This module contains the abstract base class for MTF calculations based on the PSF. This includes, e.g., the FFT-based method and the Huygen-Fresnel-based method.
Kramer Harrison, 2025
Classes
|
Base class for MTF computations based on a PSF calculation. |
- class BaseMTF(optic, fields: str | list, wavelength: str | float, strategy='chief_ray', remove_tilt=False, **kwargs)[source]
Base class for MTF computations based on a PSF calculation.
- optic
The optical system.
- fields
Original field point specification (e.g., “all” or list).
- wavelength
Original wavelength specification (e.g., “primary” or value).
- resolved_fields
List of actual field coordinates (Hx, Hy) to be used.
- resolved_wavelength
Actual wavelength value (in µm) to be used.
- view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (12, 4), add_reference: bool = False) tuple[Figure, Axes][source]
Visualizes the Modulation Transfer Function (MTF).
This method sets up the plot and iterates through field data, calling _plot_field_mtf for each field’s specific plotting.
Subclasses must ensure self.mtf, self.freq, and self.max_freq are populated before calling this method. self.resolved_fields (from __init__) is also used.
- Parameters:
fig_to_plot_on (plt.Figure, optional) – The figure to plot on. If None, a new figure will be created. Defaults to None.
figsize (tuple, optional) – The size of the figure. Defaults to (12, 4).
add_reference (bool, optional) – Whether to overlay the theoretical diffraction-limited MTF curve for a clear circular aperture. The reference is computed using the on-axis working F/# and the resolved wavelength. Defaults to False.
- Returns:
A tuple containing the figure and axes objects.
- Return type:
tuple