mtf.vectorial_fft

Vectorial FFT Modulation Transfer Function (MTF) Module.

This module provides the VectorialFFTMTF class for computing the MTF of an optical system using the vectorial FFT method, taking into account the full 3D electric field at the exit pupil.

Kramer Harrison, 2026

Classes

VectorialFFTMTF(optic[, fields, wavelength, ...])

Vectorial Fast Fourier Transform Modulation Transfer Function class.

class VectorialFFTMTF(optic, fields: str | list = 'all', wavelength: str | float = 'primary', num_rays=128, grid_size=None, max_freq='cutoff', strategy='chief_ray', remove_tilt=False, **kwargs)[source]

Vectorial Fast Fourier Transform Modulation Transfer Function class.

This class calculates the MTF of an optical system using the vectorial FFT method. It accounts for the full 3D electric field at the exit pupil and is intended for use with polarized optical systems. Use the FFTMTF factory to automatically select between scalar and vectorial implementations based on the optic’s polarization state.

Inherits all constructor arguments and attributes from ScalarFFTMTF.

view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (12, 4), add_reference: bool = False) tuple[Figure, Axes]

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