ptyrad.optics.propagator#
Numpy-based propagator functions
Functions
|
Generates the free-space propagation transfer function using the Angular Spectrum Method (ASM). |
- ptyrad.optics.propagator.near_field_evolution(Npix_shape, dx, dz, lambd)[source]#
Generates the free-space propagation transfer function using the Angular Spectrum Method (ASM).
This function calculates the exact wave propagator in Fourier space, often referred to in literature as the Angular Spectrum Method, rather than the paraxial approximation. The transfer function is defined as:
\[H(k_x, k_y) = \exp\left(i \Delta z \sqrt{k^2 - k_x^2 - k_y^2}\right)\]The output array has zero-frequency located at the corners (index
[0, 0]). This allows it to be directly multiplied with the output of standard unshifted FFT routines (e.g.,fft2).- Parameters:
Npix_shape (tuple of int) – The dimensions of the 2D grid in pixels, typically given as \((N_y, N_x)\).
dx (float) – The real-space pixel size (assumed isotropic in \(x\) and \(y\)).
dz (float, list, or numpy.ndarray) – The propagation distance(s) along the optical axis. Can be a single scalar or a 1D array of distances.
lambd (float) – The wavelength of the electron or illumination wave.
- Returns:
A complex array representing the propagation transfer function in \(k\)-space. If dz is a scalar, returns a 2D array of shape \((N_y, N_x)\). If dz is an array of length \(N_z\), returns a 3D array of shape \((N_z, N_y, N_x)\).
- Return type:
numpy.ndarray