WorksPhysics and Astronomy
A Computational and Experimental Framework for Fourier Optics in Python
Abstract
Simulation of the propagation of light is useful for the design and dimensioning of optical systems. In this paper, we present the basics of propagation simulation using Fourier optics and practical implementation in Python, with a particular emphasis on dimensions. We first verify that our numerical wave-optics simulations maintain correct physical spatial scaling. Next, we benchmark numerical propagation against closed-form analytical formulas for Gaussian beams, lens focusing effects, and grating diffraction. We then show how those simulations can be used to generate diffractive optical elements such as Fresnel zone plates, and we bridge the gap between numerical simulations and experiments by collecting data and recovering phase information using a phase retrieval algorithm.
Introduction
Light propagates through space and time as an electromagnetic wave, whose behavior can in principle be described rigorously via Green’s function formalisms. In many scenarios relevant to optical imaging and laser systems, however, a complete vector wave treatment is unnecessary. Instead, the propagation is well described by Fourier optics—a frequency-based approximation that emerges naturally when propagation distances are large and the system remains relatively close to the optic axis (the paraxial regime).
At its core, this framework relies on the property of linearity, allowing us to regard optical propagation as a mapping between an object’s spatial distribution and its corresponding spatial frequency spectrum , defined via the two-dimensional Fourier transform:
In this representation, each frequency point physically corresponds to a plane wave traveling at a unique propagation angle, as illustrated in Figure 1. Where applicable, this Fourier approach drastically simplifies complex geometries and optical elements into manageable mathematical expressions that can be computed efficiently. Beyond computational convenience, it provides profound physical insight into the behavior of imaging systems, diffraction limits, and spatial frequency filtering.

Figure 1. Conceptual representation of spatial frequency decomposition in Fourier optics: (a) An image of pansies in physical spatial coordinates; (b) The corresponding 2-D spatial frequency magnitude spectrum (displayed on a logarithmic scale), where each frequency point physically represents a plane wave traveling at a unique propagation angle.
To bridge the gap between theoretical wave propagation and practical simulation, this paper presents the fundamentals of Fourier optics simulation implemented in Python, with a rigorous emphasis on spatial scaling. We begin by verifying that our numerical wave-optics framework maintains correct physical scaling, and we benchmark our propagation routines against closed-form analytical formulas for Gaussian beams, lens focusing effects, and grating diffraction. Building on these validated foundations, we demonstrate how these simulations can be used to generate diffractive optical elements such as Fresnel zone plates. Finally, we connect numerical models directly to experimental work by processing real data and recovering lost phase information via phase retrieval algorithms.
A working familiarity with this frequency-space description of real-space objects will serve as our primary mathematical language as we move forward. Keeping these tools in mind will take us a long way through the derivations and numerical implementations that follow in § 2.
Theoretical Background: Fourier Analysis in Optics
The Fourier Transform as a Mathematical Decomposition
The primary utility of the Fourier transform (FT) in optics is its ability to perform a mathematical decomposition. Building upon the general two-dimensional transform introduced in § 1, we specialize this relationship for optical fields. A complex scalar field distribution evaluated at an input plane can be broken down into a continuous linear combination of elementary plane waves via the forward and inverse Fourier transform pair:
where determines the relative complex amplitude of each specific frequency component.
Physically, each term in the inverse integral can be identified as an elementary function consisting of a plane wave traveling in a unique direction away from the input plane, as illustrated in Figure 2. The spatial frequencies define the transverse wavelength and propagation angles via the directional cosines:

Figure 2. Conceptual schematic of spatial frequency decomposition in Fourier optics. An arbitrary input field distribution at is decomposed into a linear superposition of plane waves traveling at distinct propagation angles determined by their spatial frequency components .
This decomposition allows us to calculate the response of an optical system to an arbitrary complex field by simply superimposing the independent contributions of these individual plane wave eigenmodes, as demonstrated schematically by the continuous plane-wave fanout in Figure 2.
To see how this continuous decomposition applies to periodic structures, consider what happens when an optical field interacts with a repeating grating. Rather than a continuous spectrum, periodic boundaries constrain the decomposition to a discrete set of spatial frequencies. This behavior is illustrated in Figure 3, where an incident beam interacting with a periodic transmission function is decomposed into discrete plane wave eigenmodes that fan out into distinct, angularly separated diffraction orders (0, , . . .).

Figure 3. Physical interpretation of Fourier decomposition via a periodic diffraction grating: (a) A plane-wave optical beam at normal incidence interacts with a grating of period , acting as a spatial phase/amplitude filter; (b) The periodic structure decomposes the incident wavefront into a discrete superposition of plane wave eigenmodes, which physically fan out into discrete diffracted orders (0, , . . .); (c) Propagation fanout into distinct, angularly separated diffracted orders along the -axis.
Computational Foundations: Numerical Grid and Frequency Analysis
The foundation of a wave-optics simulation is the translation of continuous physical coordinates into discrete numerical arrays defined in terms of physical quantities, such as meters. This environment is established using a uniformly spaced spatial coordinate array spanning , which follows the standard index arrangement where a finite side length is spanned by samples. The relationship between these parameters is defined by:
where is the spatial sampling interval. In two dimensions, this is extended to a grid using np.meshgrid:
Transition to the Frequency Domain via the DFT
To move from continuous wave theory to numerical simulation, we utilize the Discrete Fourier Transform (DFT), which approximates the analytic Fourier integral through a Riemann sum. This Fourier framework is essential because it allows us to treat optical phenomena as linear spatial filters, decomposing complex field distributions into simpler ”elementary” plane waves.
By convention, the frequency domain is divided into and evenly spaced coordinate values. This is accomplished by the following substitutions for spatial frequencies and :
where
The parameters and represent the ”frequency sample intervals,” which dictate the spectral resolution of the simulation.
Fast Fourier Transform (FFT) and Array Centering
Because optical simulations frequently require cascading multiple propagation steps or performing repeated field transformations, we utilize the Fast Fourier Transform (FFT) algorithm.[1, 2] The FFT is a highly efficient implementation of the Discrete Fourier Transform (DFT) that reduces the computational complexity from to complex multiplications and additions.[2]
To appreciate this computational gain, consider a 1-D spatial coordinate array of grid points. A direct matrix evaluation of the DFT requires operations, whereas the FFT algorithm requires only operations—achieving a speedup.[2] This advantage scales even more dramatically in two-dimensional simulations ( grids). For a modest spatial array ( total pixels), a naive 2-D DFT demands or (one trillion) operations, rendering standard desktop evaluation completely unrealistic. In contrast, the 2-D FFT executes in or roughly operations. This mathematical efficiency makes 2-D wave-optics simulations accessible on standard personal computers rather than requiring high-performance supercomputing clusters.[2]
Mathematically, the Fourier transform is essentially its own inverse (a near-involution property).[1] The forward Fourier transform and the inverse Fourier transform share identical functional structures, differing only by a sign flip in the complex exponential kernel and an overall normalization factor ;[1, 2]
Because of this fundamental symmetry, both forward spectrum decomposition and inverse field reconstruction utilize the exact same FFT computational engine.[2]
A practical issue in FFT implementation concerns the spatial indexing of array values. While continuous physical optics models are centered around the optical axis (), standard FFT libraries (such as numpy.fft) expect the zero-frequency coordinate to reside at the first index position (). To maintain physical consistency and prevent phase-wrapping artifacts during numerical propagation, np.fft.fftshift and np.fft.ifftshift are applied to re-center both the complex field arrays and the spatial-frequency coordinate bins ().[2]
Free-space optical propagation is modeled in the spatial-frequency domain via the angular spectrum / transfer function approach (propTF). Given an input complex electric field defined across a transverse window size , wavelength , and propagation distance , the propagated output field is evaluated through the following three-step procedure:
Complex Angular Spectrum Computation: Convert the input spatial field into the spatial-frequency domain using the forward Fast Fourier Transform:
where denotes the spatial frequency coordinate and represents the 1-D Fourier transform operator.
Transfer Function Modulation: Apply the paraxial (Fresnel) free-space transfer function to introduce the distance-dependent quadratic phase shift across spatial frequencies.[1, 2]
where is the imaginary unit.
Field Reconstruction: Transform the modulated spectrum back to the spatial domain via the inverse Fast Fourier Transform:
Intensity and the Optical Phase Problem
While the wave propagation operator propTF processes the full complex electric field , physical sensors cannot respond to the ultra-high oscillation frequencies of optical fields ().[1, 2] Consequently, real-world optical detectors measure only the time-averaged irradiance, or intensity .[1]
where denotes the complex conjugate.
In this measurement process, the spatial phase distribution is completely discarded. The loss of phase information constitutes the fundamental phase problem in optics.[1, 3] Because wavefront curvature, focus position, and spatial aberrations are encoded directly within the phase profile, intensity-only measurements make inverse optical problems—such as wavefront sensing and aberration correction—inherently challenging, necessitating specialized recovery techniques such as interferometry, holography, or iterative phase retrieval.[1, 3, 4]

Figure 4. Comparison between the spatial screen plane and the spatial frequency plane for an grid. The spatial domain spans a physical window length , where represents the spatial sampling interval. Under the 2D Fast Fourier Transform (), the corresponding frequency spectrum spans a bandwidth with a frequency sampling resolution of .
The implementation accepts the complex input field distribution , optical wavelength , numerical window size , and displacement , returning the complex optical field at the observation plane.
Listing 1: Defining the Foundational Fourier Transform Function
def propTF(uin_V_m, L_m, lambda_m, z_m):
M = uin_V_m.size # number of samples (grid points)
dx_m = L_m/M # grid spacing
k_1_m = 2*np.pi/lambda_m # wavenumber
# Frequency coordinates
fx_1_m = np.linspace(-1/(2*dx_m), 1/(2*dx_m) - (1/L_m), M)
# Transfer function for Fresnel propagation
H = np.exp(-1j * np.pi * lambda_m * z_m * (fx_1_m**2))
H = np.fft.fftshift(H)
# Fourier transform input field
Uin_V_m = np.fft.fft(np.fft.fftshift(uin_V_m))
# Multiply in Fourier space
Uout_V_m = H * Uin_V_m
# Inverse FFT --> propagated field
uout_V_m = np.fft.ifftshift(np.fft.ifft(Uout_V_m))
return uout_V_m
Elementary Optical Fields
The transverse mode is simulated as a Gaussian intensity distribution:
where represents the beam Root Mean Square (RMS) width. We note that the RMS spatial parameter is distinct from the standard deviation, as the latter pertains strictly to statistical probability distributions rather than physical spatial intensity distributions.
In optics, it is also common practice to characterize the beam width using the Full Width at Half Maximum (FWHM). For an ideal Gaussian intensity distribution, there exists a constant linear relationship between the RMS width and the FWHM:
While both quantities can be experimentally measured, the FWHM is often simpler to measure directly from intensity profiles using standard beam profilers, whereas the RMS width provides a direct link to energy distribution and second-moment beam parameters.
Listing 2: Defining a 1D Gaussian Beam Intensity Profile
dx_m = 1e-6 # grid size, m: meter
Dx_m = 1 # screen size
x_m = np.linspace(-Dx_m/2, Dx_m/2, int(Dx_m/dx_m)+1) # spatial grid along x-axis
x_mean_m = 0.0 # centered on origin
x_std_m = 50e-6 # RMS beam width (sigma)
g = np.exp(-(x_m - x_mean_m)**2 / (2 * (x_std_m**2))) # Gaussian intensity distribution
# Calculate FWHM from RMS
fwhm_m = 2.355 * x_std_m
The complex optical field is defined as the square root of this intensity to maintain physical consistency during complex propagation. We next propagate the field by 0.1 m, compute the resulting intensity, and plot the initial and propagated profiles (Figure 5).

Figure 5. Gaussian beam comparison before and after propagation.
Listing 3: Propagating the Gaussian Optical Field
wavelength_m = 500e-9
zp_m = 100e-3 # propagation distance, m
E0 = np.sqrt(g) # initial field amplitude (E0^2 = g)
Ep = propTF(E0, Dx_m, wavelength_m, zp_m) # propTF propagates field by distance zp_m
Ip = np.abs(Ep)**2 # propagated intensity
As predicted by classical optics principles, the beam diverges when propagated over a distance—demonstrated by the decreased peak intensity and increased width of the Gaussian in Figure 5b.
For a pure Gaussian beam, conservation of the optical étendue determines the angular spread of the beam. The RMS divergence angle can be expressed directly in terms of the wavelength and initial RMS waist :
Using this RMS divergence, a good approximation of the beam size at any axial distance is given by the quadratic sum of the waist size and the spread due to angular divergence:[2]
We can generate the same 1-D Gaussian field used earlier and propagate it over a symmetric range of distances ( m to m) using the Fresnel transfer function propTF. We then extract the RMS beam size from the simulated intensity () and compare it against the theoretical value.
Listing 4: Symmetric Gaussian Beam Propagation
x_m = np.linspace(-Dx_m/2, Dx_m/2, int(Dx_m/dx_m) + 1)
sigma0_m = 50e-6 # 50 um RMS waist
I0 = np.exp(-(x_m**2) / (2 * sigma0_m**2)) # intensity profile
E0 = np.sqrt(I0) # field amplitude (real
# valued)
Z_m = np.linspace(-1.1, 1.1, 100)
sim_beam_sizes_m = []
Ixz = np.zeros((len(Z_m), len(x_m))) # normalized intensity vs (z
# ,x)
for idx, z in enumerate(Z_m):
Ez = propTF(E0, Dx_m, wavelength_m, z)
Iz = np.abs(Ez)**2
# Normalise each slice for visualisation (max = 1)
Iz_norm = Iz / Iz.max()
Ixz[idx, :] = Iz_norm
# RMS beam size from intensity weighted second moment
x_mean = np.sum(x_m * Iz) / np.sum(Iz)
sigma_z = np.sqrt(np.sum((x_m - x_mean)**2 * Iz) / np.sum(Iz))
sim_beam_sizes_m.append(sigma_z)
sim_beam_sizes_m = np.array(sim_beam_sizes_m)
# Analytical RMS beam size
theta_rad = wavelength_m / (4 * np.pi * sigma0_m) # RMS divergence (rad)
sigma_th_m = np.sqrt(sigma0_m**2 + (theta_rad * Z_m)**2)
To determine the numerical divergence angle from our wave propagation simulation, we utilize the asymptotic behavior of the beam envelope. Far from the beam waist (where the propagation distance is large compared to the initial waist size), the hyperbolic expansion approaches a linear asymptote: .
Rather than taking a single-point ratio , which leaves a residual error due to the initial waist offset , we perform a least-squares linear regression (using a first-degree polynomial fit) on the simulated beam sizes across the far-field region ( m). The resulting slope of this fit directly yields the measured numerical divergence angle .
Listing 5: Extracting the Divergence Angle via Linear Regression
# Select far-field propagation distances where linear divergence dominates
valid_indices = np.abs(Z_m) > 0.5
z_far = Z_m[valid_indices]
sigma_far = sim_beam_sizes_m[valid_indices]
# Perform a 1st-degree polynomial (linear) least-squares fit:
# sigma(z) = slope * z + intercept
popt, cov = np.polyfit(z_far, sigma_far, 1, cov=True)
# The slope (first element) corresponds to the numerical divergence angle
theta_measured = popt[0]
We overlay the analytical curve on the simulated data (Figure 6). We can also plot the same beam propagation in 2D using the normalized intensity values of each axial slice (Figure 7).

Figure 6. Comparison of simulated beam size with the analytical RMS beam size.

Figure 7. Beam propagation shown in two dimensions.
Modeling Optical Components
A core application of computational Fourier optics is the numerical representation of physical optical elements. Following the linear systems framework, optical components are modeled as complex transmittance functions that multiply the incident complex wavefront to produce an exiting field immediately after the component.[1, 2] This section focuses on modeling a positive thin lens and analyzing the diffraction-limited focal evolution of a Gaussian beam.
Theoretical Framework of the Thin Lens Transmittance
A lens is classified as “thin” if a ray entering at coordinates on the input plane exits at approximately the same coordinates on the output plane, meaning the transverse displacement of light inside the lens is negligible.[1] Under this paraxial approximation, the lens acts purely as a phase transformer that introduces a spatially varying phase delay proportional to the local thickness profile of the glass.[1, 2]
In general physical optical setups, a lens possesses a finite physical size that defines the pupil function . This pupil clips the spatial extent of the beam, limiting the spatial frequency bandwidth and establishing the effective diffraction-limited beam size at the focal plane.[1, 2] Neglecting constant phase delays, the general complex amplitude transmittance of a positive lens of focal length is given by:[1]
where is the wave number. Physically, the quadratic phase term converts an incident planar wavefront into a converging spherical wavefront that focuses at a distance downstream.
For our 1-D numerical simulations, we assume the incident beam is well contained within the lens boundary and is not clipped, allowing us to remove the pupil function (). Consequently, the thin-lens phase mask simplifies to a function of the single transverse axis :[1]
When explicit pupil clipping is included in broader physical models, we ensure that the physical aperture size is defined to be strictly smaller than the computational simulation window () so that edge-diffracted light remains fully contained within the grid. While full multi-element imaging systems are beyond the scope of this single-lens focal study, aperture pupil clipping plays a central role in imaging systems and represents a natural direction for future considerations of multi-lens systems.[1]
The focal length of the system is governed by the thin lens equation (derived from the lensmaker’s formula), which relates to the object (source) plane distance and conjugate image plane distance via the classical lens law:[1, 2]
Numerical Implementation and Code Structure
The physical principles of thin-lens wavefront modulation are implemented numerically by applying the quadratic lens phase mask onto the discretized spatial coordinate array. To visualize the complete longitudinal propagation through a lens system, transverse field slices are evaluated at discrete axial steps from the source plane (), through the lens plane (), to the conjugate image plane ().
Because peak focal intensity increases by orders of magnitude at the waist compared to the unfocused wings, plotting raw unscaled intensity profiles directly can obscure the converging and diverging beam structure away from focus. To ensure the beam cone remains clearly visible across all axial positions, each transverse slice is normalized by its local peak intensity value:[2]
Listing 6 details the Python implementation for constructing the thin-lens phase mask, propagating the field to the conjugate focal plane, and accumulating the normalized longitudinal cross-sectional map shown in Figure 8.

Figure 8. Longitudinal intensity cross-section ( map) showing coherent beam convergence through a positive thin lens at mm. The beam originates at the source plane mm and focuses at the conjugate image plane mm. Each transverse slice is normalized to its local peak intensity to render the light cone clearly visible across all axial positions.[1, 2]
Listing 6: Numerical Implementation of Lens Propagation and Longitudinal Mapping
import numpy as np
import matplotlib.pyplot as plt
# Physical parameters
p_m = 0.15 # Object/source distance to lens (m)
q_m = 0.25 # Lens to conjugate image plane distance (m)
wavelength_m = 500e-9 # Source wavelength (m)
# Thin Lens Law calculation of focal length
f_m = 1.0 / (1.0 / p_m + 1.0 / q_m)
# Quadratic lens phase mask in 1-D
lens_mask = np.exp(-1j * (2 * np.pi / wavelength_m) / (2 * f_m) * x_m**2)
# Field immediately after the lens (Ep is the propagated source field from z =
# -p_m)
E_after_lens = Ep * lens_mask
# Propagate complex field from lens plane (z = 0) to image plane (z = q_m)
Ef = propTF(E_after_lens, Dx_m, wavelength_m, q_m)
# Longitudinal scan: accumulate normalized transverse slices across Z
z_scan = np.linspace(-p_m, q_m, 200)
I_zx = []
for z in z_scan:
if z < 0:
# Propagation before lens (from source plane at z = -p_m to z)
Ez = propTF(E0, Dx_m, wavelength_m, z + p_m)
else:
# Propagation after lens (from lens plane at z = 0 to z)
Ez = propTF(E_after_lens, Dx_m, wavelength_m, z)
Iz = np.abs(Ez)**2
I_zx.append(Iz / np.max(Iz)) # Normalize each slice so beam remains visible
I_zx = np.array(I_zx)
Sampling Constraints and Transverse Magnification Scaling
A major requirement in numerical wave-optics simulations is ensuring that both free-space propagations and thin-lens phase modulations are sampled without spatial phase aliasing.[2] For a propagation distance across a transverse grid or aperture window of size , the spatial sampling interval must satisfy the fundamental sampling criterion:[2]
While general free-space propagation limits dictate the minimum grid resolution required to prevent boundary aliasing over distance , focusing through a lens specifically introduces constraints governed by transverse magnification .[1, 2]
According to paraxial geometric and wave optics, the transverse magnification for a single-lens system with object distance and conjugate image distance is defined by the distance ratio:[1]
When the input source distance and initial waist size are held constant, the focused RMS spot size at the conjugate plane scales linearly with the throw distance :
This magnification scaling governs two complementary sampling considerations during numerical focal simulations:
Focal Waist Resolution (Short ): At short image distances (small magnification ), the beam converges to a tight, highly localized focal waist. The spatial grid spacing must be sufficiently fine () to resolve the focal peak without under-sampling or corrupting numerical moment calculations.[2]
Window Boundary Expansion (Large ): At large image distances (large magnification ), the expanding beam beyond focus requires a sufficiently wide spatial window to prevent light from spilling over array boundaries and producing periodic wrap-around artifacts.[2]
Focused Spot Size vs. Image Distance
To quantitatively verify this magnification model, we simulate focal spot convergence across a sweep of image distances for a fixed object distance . For each step, the focal length is dynamically updated using the thin lens law to maintain focus at the target observation plane.
Figure 9a plots the resulting focused RMS beam radius as a function of , demonstrating an exact linear agreement with the analytical magnification scaling .

Figure 9. Quantitative magnification analysis of thin-lens focusing: (a) Focused RMS spot size as a function of conjugate image distance for m, verifying the linear relationship ; (b, c) Stacked 2-D transverse focal intensity distributions () comparing the tight, high-contrast spot at short throw ( m) against the magnified profile at intermediate throw ( m).
To illustrate the spatial impact of magnification on the transverse profile, Figure 9b and Figure 9c present 2-D cross-sectional intensity distributions evaluated at two distinct conjugate image planes:
Short Throw Distance (, ): At short image distances, the beam undergoes strong convergence, concentrating the optical power into a tight, high-contrast focal spot with a compact spatial footprint (Figure 9b).
Intermediate Throw Distance (, ): At larger throw distances, the increased transverse magnification spreads the optical power across a wider spatial area, yielding a broader spot profile (Figure 9c).
It is important to note that the linear magnification ratio holds strictly under ideal conditions where no pupil or aperture clipping occurs. When physical aperture limits or severe pupil clipping are introduced, truncated optical power redistribution causes the actual imaged spot to appear larger than predicted by simple geometric scaling. Throughout this analysis, we assume an idealized numerical aperture window without truncation artifacts—a constraint that warrants further investigation regarding finite lens apertures in future work.
Listing 7 provides the Python code used to execute the image-distance sweep, calculate the focal waist sizes, and generate the stacked 2-D intensity maps.
import numpy as np
import matplotlib.pyplot as plt
# Fixed simulation parameters
p_m = 0.15 # Fixed object distance (150 mm)
wavelength_m = 500e-9 # Source wavelength (500 nm)
# Sweep of conjugate image distances q_m
q_sweep_m = np.linspace(0.05, 0.50, 10)
sigma_image_m = []
# Loop over q distances to compute focal spot sizes
for q_m in q_sweep_m:
f_m = 1.0 / (1.0 / p_m + 1.0 / q_m) # Focal length via Thin Lens Law
lens_mask = np.exp(-1j * (np.pi / (wavelength_m * f_m)) * x_m**2)
E_after_lens = Ep * lens_mask
Ef = propTF(E_after_lens, Dx_m, wavelength_m, q_m)
If = np.abs(Ef)**2
# Calculate numerical RMS waist size from second moment
x_mean = np.sum(x_m * If) / np.sum(If)
sig_z = np.sqrt(np.sum((x_m - x_mean)**2 * If) / np.sum(If))
sigma_image_m.append(sig_z * 1e6) # Convert to micrometers
Quantitative Verification of System Magnification
To validate the numerical accuracy of our wave-optics framework, we perform a statistical characterization of the beam size at both the source plane () and conjugate focal plane () using the Root Mean Square (RMS) width. The RMS width provides a robust measure of the spatial extent of the intensity distribution by calculating its second central moment:[2]
where is the centroid (intensity-weighted first moment) of the beam, and provides power normalization, ensuring that is invariant to overall intensity scaling.[2] Listing 8 tracks the beam width from the initial object plane to the focused image plane for m and m.
Listing 8: Numerical Verification of Beam Magnification
# Compute field at conjugate focus (q_m = 0.25 m)
Ep_focus = propTF(E_after_lens, Dx_m, wavelength_m, q_m)
I_focus = np.abs(Ep_focus)**2
# RMS width of initial beam at object plane (source)
x_mean_init = np.sum(x_m * np.abs(E0)**2) / np.sum(np.abs(E0)**2)
x_std_init = np.sqrt(np.sum((x_m - x_mean_init)**2 * np.abs(E0)**2) / np.sum(np.abs(E0)**2))
# RMS width of focused beam at conjugate image plane (focus)
x_mean_focus = np.sum(x_m * I_focus) / np.sum(I_focus)
x_std_focus = np.sqrt(np.sum((x_m - x_mean_focus)**2 * I_focus) / np.sum(I_focus))
Executing this script yields:
Initial RMS beam size: 25.00 um
Focused RMS beam size: 41.67 um
Calculated Ratio (initial/focused): 0.60
Interpretation of Results
The transverse magnification predicted by geometric optics for m and m is . Applying this scale factor to our initial Gaussian beam waist ( µm) predicts a focused spot size of exactly:
Our wave-optics simulation—computed via the propTF function propagator—recovers this exact value of 41.67 µm. The calculated scaling ratio of 0.60 represents the inverse magnification (). This perfect numerical agreement verifies that our discrete Fourier framework preserves physical spatial scaling, energy conservation, and imaging magnification laws.[1, 2]
Simulation of Diffractive Elements and Gratings
A key area of wave-optics modeling is the simulation of diffractive optical elements, which manipulate wavefronts through localized diffraction rather than refraction.[1] In the linear systems framework, a diffracting screen is represented by its complex amplitude transmittance function , defined as the ratio of the exiting complex field to the incident complex field immediately behind the screen.[1, 2]
Diffractive elements are generally categorized into amplitude gratings, which control the magnitude of the field, and phase gratings, which alter the local optical path length without weakening the field.[1, 2] This section focuses on modeling a binary amplitude grating and analyzing the resulting spatial frequency separation as the field propagates.
Binary Amplitude Grating Formulation and Sampling
A binary diffraction grating consists of a periodic array of opaque and transparent slits acting as a square-wave transmittance mask with a period that alternates between 0 (absorption) and 1 (complete transmission).[1]
To model this square-wave profile directly, we take the signum function of a sine wave and scale/shift it to make the transmittance strictly positive, alternating cleanly between 0 and 1:
We implement this periodic transmittance in a 1-D spatial grid. The number of discrete grid points that span a single grating period must satisfy:[2]
to avoid spatial aliasing. While a minimum of 2 samples satisfies Eq (28), a larger value of is required in practice to represent the abrupt, step-like binary phase and amplitude boundaries without introducing numerical ringing artifacts.[1, 2]
With a grid spacing of and a grating period of , our grid allocates exactly samples per cycle, ensuring a highly resolved representation of the binary transition boundaries.
Listing 9: Generating a Binary Grating Mask
period_m = 10e-6 # Grating period (10 micrometers)
# Create a binary mask where transmission is 1 (True) or 0 (False)
grating = 0.5 * (1 + np.sign(np.sin(2 * np.pi * x_m / period_m)))
# Apply the transmittance function to the propagated beam
Eg = Ep * grating
Ig = np.abs(Eg)**2
When the propagated Gaussian field interacts with this element, the exiting complex field is the point-wise product of the wave and the mask. This results in an altered near-field intensity distribution where the smooth Gaussian envelope is masked by the periodic structure, as shown in Figure 10.

Figure 10. Transverse intensity distribution () of a Gaussian beam immediately after passing through the binary grating mask, showing the modulation of the Gaussian envelope.
Tilt in Fourier Propagation
Beyond diffraction from periodic structures, wave-front manipulation can also be introduced via phase ramps, commonly referred to as tilt. Applying a linear phase modulation across the initial field tilts its direction of travel, causing the entire beam to steer off-axis during propagation.
An angular tilt modifies the optical field such that, under the paraxial approximation, it translates to a linear transverse displacement over propagation distance .1
For a specified tilt angle of mrad (0.01 rad), the expected transverse displacement at a propagation distance of mm is:
To track this trajectory, we simulate the propagation loop by applying the tilt factor to the initial field and evaluating the transverse intensity profile across axial steps up to mm.
Listing 10: Longitudinal Propagation of a Tilted Gaussian Beam
zp_m = 100e-3 # propagation distance, m
Et = E0 * tilt # apply tilt to the initial field
Ept = propTF(Et, Dx_m, wavelength_m, zp_m) # propagate
Ipt = np.abs(Ept)**2 # intensity
# Longitudinal grid setup
num_pts = 100
z_after = np.linspace(0, zp_m, num_pts)
# Propagation loop with per-slice peak normalization
I_zx = []
for z in z_after:
Ep = propTF(Et, Dx_m, wavelength_m, z)
I_slice = np.abs(Ep) ** 2
# Normalize slice to its peak value
max_val = np.max(I_slice)
``
if max_val > 0:
I_slice = I_slice / max_val
I_zx.append(I_slice)
I_zx = np.array(I_zx)
The resulting longitudinal intensity profile, shown in Figure 11, clearly illustrates the steering effect. As the beam propagates from to mm, its center shifts continuously downward to approximately m (1 mm). This exact agreement with analytical predictions confirms that the transfer function propagator correctly handles directional shifts associated with off-axis beam propagation.[1, 2]

Figure 11. Longitudinal intensity profile ( cross-section) of a Gaussian beam with a 10 mrad wavefront tilt, showing linear transverse steering over a 100 mm propagation range.
Longitudinal Propagation and Angular Separation
We can map the 2-D longitudinal evolution of the diffracted field across the plane by repeating the propagation calculations over a sequence of axial steps . As light travels away from the grating plane, the individual Fourier components (the diffracted orders) begin to separate.
According to classical grating diffraction theory, the diffracted orders exit the screen at angles governed by the grating equation:[1]
Under the paraxial approximation, these angular deflections translate to a linear spatial separation along the transverse axis as a function of propagation distance :[1]
For our simulation parameters ( nm, m), the first-order deflection angle is:
At a propagation distance of mm (0.1 m), the expected transverse separation of the +1 and -1 diffracted orders from the central optical axis is:
In the scanning loop used to construct this longitudinal propagation map, for each step , we propagate the field , normalize its intensity to maintain visual contrast, and calculate the evolving beam RMS width to monitor divergence.
Listing 11: Binary Grating Mask in Two Dimensions
# Define axial steps from z = 0 to z = 0.5 m
Z = np.linspace(0, 0.5, 500)
sim_beam_sizes = []
Ixz = np.zeros((len(Z), len(x_m)))
for i, z in enumerate(Z):
Ed = propTF(Eg, Dx_m, wavelength_m, z)
Id = np.abs(Ed)**2
Ixz[i, :] = Id / np.max(Id)
x_mean = np.sum(x_m * Id) / np.sum(Id)
x_std = np.sqrt(np.sum((x_m - x_mean)**2 * Id) / np.sum(Id))
sim_beam_sizes.append(x_std)
sim_beam_sizes = np.array(sim_beam_sizes)
The resulting cross-sectional intensity map, shown in Figure 12, visually illustrates this diffractive branching. Near the grating plane (), the field remains confined. As increases, the wave-front splits into distinct fan-out cones. The central branch represents the 0-order beam containing 25% of the incident power, while the branching arms represent the +1 and −1 diffracted orders, each containing 6.25% of the incident power.

Figure 12. Longitudinal intensity profile ( cross-section) of a Gaussian beam after passing through the grating, illustrating the spatial fan-out of the 0 and diffraction orders.
The spatial separation observed in Figure 12 matches our analytical paraxial calculation of ±5 mm at mm, demonstrating that the paraxial propagator propTF correctly preserves the wave scaling, angular dispersion, and physical scaling limits of Fourier optics.[1, 2]
Experimental Characterization of Diffractive Focusing Elements
While refractive optics dominate visible-light imaging, diffractive optical elements such as Fresnel zone plates are essential in regions of the electromagnetic spectrum—such as the extreme ultraviolet and X-ray regimes—where conventional optical glasses are highly absorbing.[3] FZPs manipulate wavefronts through localized diffraction rather than refraction, focusing light by constructive interference of waves emanating from concentric circular zones. This section details the experimental characterization of a Fresnel zone plate and compares the measured focal evolution against paraxial wave propagation theory.
Theoretical Framework of Fresnel Zone Plates and Digital Holography
A Fresnel zone plate (FZP) is a diffractive lens consisting of concentric alternating transparent and opaque zones. For a rigorous treatment of zone plate transmittance functions, multi-order focal positions (), and diffractive efficiencies, the reader is referred to Atwood.5
To maximize diffraction efficiency in computational optics, we implement a phase-only binary holographic reconstruction workflow.
Numerical Implementation and Code Structure
The simulation isolates the phase components of the forward-propagated source field () and back-propagated image field () to construct a stationary interference pattern without amplitude attenuation.1,2 Hard thresholding is then applied to generate a binary mask suitable for digital wavefront reconstruction.
Listing 12 consolidates this workflow: isolating the phase superposition, binarizing to form the mask, modulating with a reference plane wave, and back-propagating to the focal plane.
Listing 12: Numerical Recombination, Binarization, and Digital Holographic Reconstruction
# 1. Isolate phase and compute phase-only superposition
I_sum = np.abs(E_source_prop + E_image_prop)**2
phase_source = np.exp(1j * np.angle(E_source_prop))
phase_image = np.exp(1j * np.angle(E_image_prop))
I_sum2 = np.abs(phase_source + phase_image)
# 2. Threshold to generate binary hologram mask (0 or 1)
hologram = (I_sum2 / 2) >= 0.5
# 3. Wavefront Playback: Use a uniform incident reference beam (plane wave)
E_source_holo = np.ones(hologram.shape)
# 4. Modulate reference wave by the binary hologram
E_holo = E_source_holo * hologram
# 5. Propagate back to focal plane (-z_prop_m to focus down to a point)
E_image_holo = propTF(E_holo, Dx_m, 500e-9, -z_prop_m)
Physical Interpretation of the Reconstructed Field
As illustrated in Figure 13, the workflow progresses through four physical regimes:

Figure 13. Simulation and reconstruction of holographic interference patterns: (a) Total continuous intensity distribution , (b) Phase-only superposition , (c) Binarized digital hologram mask, and (d) Reconstructed focal intensity profile . Spatial dimensions are in micrometers ().
Continuous Interference (Figure 13a): Quadratic phase curvature mismatch between the source and image fields produces high-contrast concentric interference fringes with a central destructive intensity null.[1, 2]
Phase-Only Superposition (Figure 13b): Setting local amplitudes to unity isolates the phase carrier, maintaining 100% modulation contrast and preventing high-frequency outer fringes from decaying into noise.
Binary Hologram Mask (Figure 13c): Thresholding at 0.5 converts the continuous phase pattern into a binary transmission grating analogous to a binary FZP.
Reconstructed Focus (Figure 13d): During wavefront playback, the binarized hologram is illuminated by a replica of the original source reference wave () and propagated to the conjugate focal plane. Despite the complete loss of amplitude information and the severe non-linear binarization of the phase carrier, the reconstructed intensity distribution successfully focuses into a highly localized, diffraction-limited central spot.
Data Collection
Intro to Data Collection
To validate our numerical transfer-function propagator (propTF) against physical wave fields, we constructed an optical test bench to perform camera-based through-focus profiling. Before presenting the reconstructed longitudinal intensity distributions, it is essential to establish the physical geometry, component specifications, and data collection routine of the apparatus.
As illustrated in the schematic diagram of Figure 14, the experimental apparatus consists of three primary optical sections:

Figure 14. Photo and schematic diagram of the optical bench setup for through-focus spatial profiling: A spatially filtered, collimated laser beam ( nm) illuminates the test optic (a Fresnel zone plate). A high-resolution camera profiler (3.45 m pixel pitch) is mounted on a linear translation stage and swept along the optical axis (-axis) across the focal volume, capturing a sequence of 2-D transverse intensity distributions at discrete axial positions.
Coherent Illumination Source: A spatially filtered and collimated laser source ( nm) delivers a uniform, clean planar wavefront across the clear aperture of the optical bench.
Test Optical Element: The collimated beam interacts with the test optic—a Fresnel zone plate (FZP)—which impresses a converging quadratic phase delay onto the incident wavefront to form a diffraction-limited focus.
Axial Camera Profiling Assembly (-Scan): A high-resolution camera profiler (pixel pitch , 8-bit ADC, full well capacity 10,000 ) is mounted on an axial linear translation stage aligned along the optical axis ().
Radiometric Calibration to Physical Power Density
To convert raw camera digital numbers (ADU) into absolute physical irradiance (W/m), we implement a multi-stage radiometric conversion pipeline.
First, raw 8-bit (sensor-specific) digital readings are converted to photoelectron counts using the sensor full well capacity (FWD = 10,000 ):
Accounting for the camera quantum efficiency (QE = 0.8), the photoelectron field is converted into incident photon counts . The optical energy deposited per pixel is calculated using Planck’s photon energy relation at nm (source specific) ( J):
Dividing by the camera exposure time used () converts energy to optical power in Watts. Finally, dividing by the individual pixel area (, with pixel pitch ) yields the absolute power density distribution in W/m:
Listing 13 details the implementation of this calibration routine.
Listing 13: Converting Detector ADU Readings to Physical Irradiance (W/m)
# Sensor specifications
fwd = 10000 # Full well depth (electrons)
bit_depth = 8 # 8-bit ADC (0 to 255)
qe = 0.8 # Quantum efficiency
exposure_time_s = 75e-6 # Exposure time (75 microseconds)
pixel_size_m = 3.45e-6 # Pixel size (3.45 micrometers)
wavelength_m = 633e-9 # Laser wavelength (633 nm)
# Physical constants
h_Js = 6.62607015e-34 # Planck’s constant (J*s)
c_ms = 3e8 # Speed of light (m/s)
# 1. ADU -> Photoelectrons
electrons_per_adu = fwd / (2**bit_depth - 1)
img_electron = data * electrons_per_adu
# 2. Photoelectrons -> Incident Photons
img_photon = img_electron / qe
# 3. Photons -> Deposited Energy (Joules)
E_J = h_Js * c_ms / wavelength_m
img_J = img_photon * E_J
# 4. Energy -> Power (Watts)
img_power_W = img_J / exposure_time_s
# 5. Power -> Power Density (W/m^2)
img_power_density_W_m2 = img_power_W / (pixel_size_m**2)
# Spatial axes in millimeters
x_mm = np.linspace(0, img_power_density_W_m2.shape[5] * pixel_size_m * 1e3,
img_power_density_W_m2.shape[5])
y_mm = np.linspace(0, img_power_density_W_m2.shape * pixel_size_m * 1e3,
img_power_density_W_m2.shape)
Experimental Spatial Profiling and Data Extraction
To experimentally map the diffractive focusing behavior, a through-focus series is recorded by capturing the transverse spatial profile of the beam at discrete axial planes along the optical axis. The experimental run consists of a 21-step scan spanning a total range of 2.0 m around the nominal focal volume of an aberration-free test zone plate.
The captured 2-D images are integrated along the vertical axis to compress the spatial data into 1-D transverse cross-sections. These 1-D profile slices are normalized to prevent saturation and then concatenated sequentially to map the longitudinal intensity evolution across the focal volume.
Theoretical Comparison and Focal Verification
The reconstructed longitudinal profile (Figure 15) illustrates the formation of a highly symmetrical diffractive light cone on either side of the focal waist. This spatial evolution is compared directly with paraxial wave theory.

Figure 15. Experimentally reconstructed longitudinal intensity distribution ( cross-section) of the laser beam passing through the Fresnel zone plate focal volume.
Under the paraxial approximation, the convergence and subsequent divergence of the diffractive light cone are governed by the numerical aperture of the outermost zone.1 In our experimental prototype, the zone plate focal length is identified by locating the plane of maximum axial intensity and optimal contrast, which corresponds to the narrowest transverse spot size in the through-focus profile:[3]
By fitting this contrast curve to a Gaussian model, the plane of best focus is determined with high sub-pixel precision.[3]
The successful mapping of this focal waist demonstrates that our paraxial propagation framework—based on the discrete transfer function propagator propTF—accurately models not only simple refractive elements but also complex diffractive optics. This quantitative validation confirms that the numerical scaling conventions are fully preserved when translating physical experimental data into the computational domain.[2]
Iterative Phase Retrieval: The Gerchberg-Saxton Algorithm
A fundamental limitation of physical optical sensors is that they are sensitive only to time-averaged irradiance (intensity) , completely discarding the phase of the complex amplitude field. However, the phase distribution contains vital information regarding wavefront aberrations, propagation direction, and spatial coherence.[3] While digital holography recombines a reference wave to record phase interferometrically, iterative phase retrieval represents a powerful, referenceless alternative that extracts the complex phase digitally from intensity measurements alone.[4]
The Gerchberg-Saxton (GS) algorithm, originally proposed by Gerchberg and Saxton in 1972 for electron microscopy, is an iterative optimization framework that reconstructs a complex field by cycling between two planes with known intensity constraints. While classical GS algorithms propagate between the spatial domain and its Fourier transform plane, modern wave-optics metrology frequently employs the algorithm in the Fresnel (or diffractive) domain.[4] Propagating between two axially separated diffractive planes (such as a focus and a defocused plane) significantly accelerates the convergence rate and reduces reconstruction error.[4]
Mathematical Formulation and Convergence Metrics
We define two measurement planes along the optical propagation axis: Plane A (located at position , representing the focal plane) and Plane B (located at , representing a defocused plane), separated by an axial distance . The known physical constraints are the measured intensities and captured at these planes.
The target amplitudes and are defined as the square roots of the corresponding irradiances:[4]
If an initial phase estimate is unavailable, the algorithm begins by assigning a random phase distribution to the amplitude at Plane A.[4] Let represent the estimated complex field at Plane A during iteration . The iterative loop proceeds through the following sequential operations:
Enforce Plane A Constraints: We construct the starting field estimate at Plane A by combining the known target amplitude with the retrieved phase .[4]
Forward Fresnel Propagation: The field is propagated forward by the distance to Plane B using the paraxial transfer function operator .[2, 4]
Enforce Plane B Constraints: The calculated amplitude is replaced by the target amplitude , while preserving the phase resulting from propagation.2
Backward Fresnel Propagation: The modified field is propagated backward by the distance to return to Plane A.2
The phase of this back-propagated field, , is extracted to initialize the next iteration.2
To evaluate convergence, we define the root-mean-square (RMS) error of the intensity profile at each step.2 In our numerical model, this error is calculated as the normalized Euclidean norm of the difference between the propagated field’s intensity and the target Plane B measurement:
Numerical Implementation and Code Structure
Listing 14 details the core Python loop of our Fresnel-domain Gerchberg-Saxton implementation. By utilizing our paraxial propagator propTF, the code simulates the propagation steps using Fourier domain filtering, tracking error convergence over 50 iterations.
# Indices for Plane A (best focus) and Plane B (defocused plane)
idx_A = 20 # Plane A index in the z_scan array
idx_B = 19 # Plane B index in the z_scan array
# Known target intensities and propagation distance
I_z = np.abs(E_z[:, idx_A])**2 # Intensity at Plane A (target)
I_z_p = np.abs(E_z[:, idx_B])**2 # Intensity at Plane B (target)
dz = z_scan[idx_B] - z_scan[idx_A] # Propagation distance (Delta z)
# Target amplitudes derived from intensities
amp_A = np.sqrt(I_z)
amp_B = np.sqrt(I_z_p)
# Initial phase guess at plane A: use Ef phase if available, otherwise random
try:
init_phase = np.angle(Ef)
if init_phase.size != amp_A.size:
raise Exception()
except Exception:
init_phase = np.random.uniform(-np.pi, np.pi, size=amp_A.size)
u_A = amp_A * np.exp(1j * init_phase)
num_iterations = 50
errors = np.zeros(num_iterations)
for k in range(num_iterations):
# 1. Forward propagate from Plane A to Plane B
u_B = propTF(u_A, Dx_m, wavelength_m, dz)
# 2. Enforce amplitude constraint at Plane B
u_B = amp_B * np.exp(1j * np.angle(u_B))
# 3. Backward propagate from Plane B to Plane A
u_A = propTF(u_B, Dx_m, wavelength_m, -dz)
# 4. Enforce amplitude constraint at Plane A
u_A = amp_A * np.exp(1j * np.angle(u_A))
# 5. Monitor convergence: calculate normalized RMS error at Plane B
recon_B = propTF(u_A, Dx_m, wavelength_m, dz)
err = np.linalg.norm(np.abs(recon_B)**2 - I_z_p) / (np.linalg.norm(I_z_p) +
1e-20)
errors[k] = err
# Final reconstructed fields at both planes
recon_A = u_A
recon_B = propTF(recon_A, Dx_m, wavelength_m, dz)
Convergence Analysis and Experimental Considerations
The convergence performance of our numerical implementation is plotted in Figure 16(a). In the absence of random noise, the relative intensity error decreases monotonically, reaching a machine-precision floor of approximately within 50 iterations. The intensity overlay (Figure 16(b)}) demonstrates that the reconstructed fields converge perfectly to the target Gaussian profiles. Most importantly, the phase retrieval successfully recovers the original quadratic phase profile at Plane A, establishing a perfect overlay with the unwrapped phase of the physical field (Figure 16(c)}).

Figure 16. Fresnel-domain GS algorithm performance: (Left) Monotonic convergence of the relative intensity error over 50 iterations. (Center) Comparison of target and reconstructed intensities at both Plane A and Plane B. (Right) Retrieved phase versus the original phase at Plane A.
The diffractive GS framework provides an exceptionally stable and precise tool for wavefront characterization and beam diagnostics, matching analytical wave theory without requiring complex interferometric hardware.[3, 4]
Structured Wavefronts: Helical-Wavefront Beams and Spiral Phaseplates
While the diffractive elements discussed above focus optical energy into highly localized spots,[3] wave optics also enables the generation of structured fields with custom intensity and phase topologies. A prominent class of structured light is the helical-wavefront laser beam—or spiral beam—which is characterized by a phase term proportional to the azimuthal angle :[4]
where is an integer representing the topological charge of the vortex.[4] At the center of the beam (), the phase has a screw dislocation (or phase singularity) where the phase is mathematically undefined.[1, 4] To satisfy the scalar wave equation, the complex field amplitude must vanish at this singularity, forming a dark central core surrounded by a bright ring—the classic ”doughnut” intensity profile.[2, 4]
These fields represent orbital angular momentum (OAM) eigenmodes carrying a well-defined torque of per photon, completely independent of the wave’s polarization state.[4]
Numerical Construction of the Vortex Phase
Following discrete grid conventions, we represent this helical phase profile numerically by constructing a two-dimensional spatial Cartesian coordinate grid using np.meshgrid.[2] The azimuthal angle is computed at each pixel using the four-quadrant inverse tangent function (np.arctan2). The complex vortex field is then generated by multiplying a centered Gaussian amplitude distribution by the spiral phase mask.
Listing 15: Numerical Generation of a Charge-2 Vortex Beam
# Generate a spiral ( vortex ) phase and propagate the vortex beam
charge = 2 # topological charge (ell)
# Compute azimuthal angle theta using a 2D meshgrid
X, Y = np.meshgrid(x_m, y_m)
theta = np.arctan2(Y, X)
# Create spiral phase mask and apply to the input Gaussian field
spiral_phase = np.exp(1j * charge * theta)
vortex = uin_V_m * spiral_phase
Immediately after the phase mask is applied (), the beam’s intensity profile remains a solid, unaltered Gaussian spot because the phase modification does not affect the local irradiance (Figure 17).[2, 4]

Figure 17. Initial vortex beam state (charge ): (Left) Azimuthal phase ramp showing of total phase rotation. (Right) Gaussian intensity profile immediately before propagation.
Propagation and Laguerre-Gaussian Mode Decomposition
The physical properties of the vortex beam emerge during free-space propagation. Using the paraxial transfer function propagator propTF, the field is evolved over a distance m.
Listing 16: Propagation of the Vortex Field
# Define propagation parameters
z_prop_m = 0.05
wavelength = 500e-9
# Compute the complex field at distance z
field_out = propTF(vortex, Dx_m, wavelength, z_prop_m)
Because a “spiralized” Gaussian beam is no longer a pure transverse mode of free space, it is best analyzed by decomposing the exiting field into a complete set of orthogonal Laguerre-Gaussian (LG) modes.[4] LG modes propagate with only a scale change of their intensity distribution, and they naturally accommodate helical phase terms of the form .[4]
When propagating downstream, the destructive interference of these superimposed modes close to the optical axis enforces the on-axis intensity null.[4] This results in the ring-like ”doughnut” intensity profile and helical spiral phase arms illustrated in Figure 18.

Figure 18. Propagated vortex beam at m: (Left) Intensity distribution showing the central singularity. (Right) Helical phase structure showing the spiral evolution of the wavefront.
By varying the charge parameter, the framework can simulate a variety of structured light fields, vortices of () (Figure 19(a)) or () (Figure 19(b)).

Figure 19. (a) Just as the phase plot had two “arms,” at the propagated phase has only one ”arm.” (b) At the propagated phase has three.
Conclusion
In this work, we presented a comprehensive computational and experimental framework for wave optics and scalar diffraction modeling implemented entirely in Python. Heavily inspired by David Voelz’s foundational text, Computational Fourier Optics: A MATLAB Tutorial,3 this project translates classical numerical Fourier optics algorithms—originally developed for the MATLAB environment—into an open-source, flexible, and accessible Python framework.
Throughout this paper, we established the foundational numerical building blocks required for discrete wave-optics simulations, beginning with 2-D spatial grid conventions, frequency-domain array centering, and paraxial transfer-function propagation (propTF). We demonstrated the modeling of both refractive optical systems—such as positive thin lenses and conjugate magnification scaling—and diffractive optical elements, including binary amplitude gratings, Fresnel zone plates, and structured optical vortex beams carrying orbital angular momentum. Furthermore, we validated these theoretical tools against laboratory through-focus profiling data and demonstrated advanced wavefront recovery methods, including phase-only digital holography playback and referenceless, iterative Fresnel-domain phase retrieval using the Gerchberg-Saxton algorithm.
To streamline future work and make these tools readily accessible to the broader optics community, the core functions developed throughout this research—including spatial grid generators, transfer-function propagators, diffractive mask constructors, and phase-retrieval routines—have been bundled into a dedicated open-source Python package. The topolino package is published on the Python Package Index (PyPI) and can be accessed at https://pypi.org/project/topolino/. By bridging classical scalar wave theory with modern Python scientific computing libraries, this work provides a versatile foundation for optical design, beam diagnostics, and computational metrology.
References
- [1]Goodman J W 1996 Introduction to Fourier Optics 2nd ed (New York: McGraw-Hill)
- [2]Voelz D G 2011 Computational Fourier Optics: A MATLAB® Tutorial (Tutorial Texts in Optical Engineering vol TT89) (Bellingham, WA: SPIE Press)DOI
- [3]Miyakawa R, Zhou X, Goldstein M, Ashworth D, Cummings K, Fan Y J, Shroff Y, Denbeaux G, Kandel Y and Naulleau P 2014 AIS wavefront sensor: a robust optical test of exposure tools using localized wavefront curvature Extreme Ultraviolet (EUV) Lithography V (Proceedings of SPIE vol 9048) ed Wood II O R and Panning E M p 90483ADOI
- [4]Zalevsky Z, Mendlovic D and Dorsch R G 1996 Optics Letters 21 842–844