zernike_strehl_ratio#
- pyzernike.zernike_strehl_ratio(coefficients: Sequence[float] | ndarray, wavelength: Real, *, normalize: bool = False) float[source]#
Approximate the Strehl ratio of a wavefront described by the coefficients of Zernike polynomials.
The Strehl ratio \(S\) is the ratio of the peak intensity of the point spread function to the peak intensity of the aberration-free system. For small aberrations, it depends only on the RMS \(\sigma\) of the wavefront (see
pyzernike.zernike_rms()), with the extended Maréchal approximation [1]:\[S \approx \exp\left( -\left( \frac{2 \pi \sigma}{\lambda} \right)^2 \right)\]The approximation is accurate for \(S \gtrsim 0.3\) (\(\sigma \lesssim \lambda / 6\)). The Maréchal criterion of a diffraction-limited system, \(\sigma \leq \lambda / 14\), corresponds to \(S \geq 0.8\).
See also
pyzernike.zernike_rms()for the RMS of the wavefront.The page Coefficients of a sum of polynomials for the statistics of a sum of polynomials.
- Parameters:
coefficients (Union[Sequence[float], numpy.ndarray]) – The coefficients \(c_j\) of the wavefront in the OSA/ANSI ordering, as a 1D array of \(P = \frac{(N+1)(N+2)}{2}\) finite real numbers.
wavelength (Real) – The wavelength \(\lambda\), in the unit of the coefficients (e.g. both in micrometers, or the coefficients in waves and
wavelength=1). Must be finite and strictly positive.normalize (bool, optional) – If True, the coefficients are those of the polynomials normalized by the factors of Noll (see
pyzernike.zernike_normalization()). Default is False.
- Returns:
The approximated Strehl ratio \(S \in (0, 1]\).
- Return type:
float
- Raises:
TypeError – If
coefficientscan not be converted to an array of real numbers, ifwavelengthis not a real number, or ifnormalizeis not a boolean.ValueError – If
coefficientsis not a 1D array of finite values whose length is \(\frac{(N+1)(N+2)}{2}\), or ifwavelengthis not finite or not strictly positive.
References
Examples
A normalized defocus of \(\lambda / 14\) RMS gives a Strehl ratio of about 0.82:
from pyzernike import zernike_strehl_ratio zernike_strehl_ratio([0.0, 0.0, 0.0, 0.0, 1 / 14, 0.0], wavelength=1.0, normalize=True) # 0.8176...