fraunhofer_wp#
- pyrost.bin.fraunhofer_wp(wft: numpy.ndarray, dx0: float, dx: float, z: float, wl: float, axis: int = - 1, backend: str = 'numpy', num_threads: int = 1)#
Fraunhofer diffraction propagator. Propagates a wavefront wft by z distance downstream. You can choose between ‘fftw’ and ‘numpy’ backends for FFT calculations.
- Parameters
wft (numpy.ndarray) – Initial wavefront.
dx0 (float) – Sampling interval at the plane upstream [um].
dx (float) – Sampling interval at the plane downstream [um].
z (float) – Propagation distance [um].
wl (float) – Incoming beam’s wavelength [um].
axis (int) – Axis of wft array along which the calculation is performed.
backend (str) – Choose between numpy (‘numpy’) or FFTW (‘fftw’) library for the FFT implementation.
num_threads (int) – Number of threads used in the calculations.
- Returns
Propagated wavefront.
- Raises
RuntimeError – If ‘numpy’ backend exits with eror during the calculation.
ValueError – If backend option is invalid.
- Return type
Notes
The Fraunhofer integral transform is defined as:
\[u^{\prime}(x^{\prime}) = \frac{e^{-j k z}}{j \sqrt{\lambda z}} e^{-\frac{j k}{2 z} x^{\prime 2}} \int_{-\infty}^{+\infty} u(x) e^{j\frac{2 \pi}{\lambda z} x x^{\prime}} dx\]