zernike.base#
Base Zernike Module
This module contains the abstract base class for all zernike-related classes. The Zernike implementation in this module is based on Niu, K., & Tian, C. (2022). Zernike polynomials and their applications. Journal of Optics, 24(12), 123001. https://doi.org/10.1088/2040-8986/ac9e08
Kramer Harrison, 2025
Classes
|
Abstract base class for Zernike polynomials. |
- class BaseZernike(coeffs=None, num_terms=36)[source]#
Abstract base class for Zernike polynomials.
- Parameters:
coeffs (array-like) – The Zernike coefficients. Defaults to None.
num_terms (int) – the maximum number of terms. Only used if coeffs is None. Defaults to 36.
- get_derivative(n=0, m=0, r=0, phi=0)[source]#
Calculate the derivative of the Zernike polynomial for the given coefficients and parameters.
Returns a tuple of the radial (dZ / dr) and azimuthal (dZ / dphi) partial derivatives of the Zernike polynomial.
- get_term(coeff: ScalarOrArray = 0, n: int = 0, m: int = 0, r: ScalarOrArray = 0, phi: ScalarOrArray = 0) ScalarOrArray[source]#
Calculate the Zernike term for given coefficients and parameters.
- Parameters:
- Returns:
The calculated value of the Zernike term.
- Return type:
- poly(r: ScalarOrArray = 0, phi: ScalarOrArray = 0) float[source]#
Calculate the Zernike polynomial for given radial distance and azimuthal angle.