zernike.fringe
Fringe Zernike Module
This module contains the FringeZernike class, which defines Zernike polynomials based on the “fringe”, or “University of Arizona”, indexing scheme.
References
https://en.wikipedia.org/wiki/Zernike_polynomials#Fringe/ University_of_Arizona_indices
Kramer Harrison, 2025
Classes
|
Zernike Fringe Coefficients |
- class ZernikeFringe(coeffs=None, num_terms=36)[source]
Zernike Fringe Coefficients
This class represents Zernike Fringe Coefficients. It is a subclass of the BaseZernike class.
- Parameters:
coeffs (list) – the coefficient list for the Zernike polynomials. Defaults to all zeros (36 elements total)
References
https://en.wikipedia.org/wiki/Zernike_polynomials#Fringe/ University_of_Arizona_indices
- get_derivative(n=0, m=0, r=0, phi=0)
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.
- Parameters:
n (int) – Radial order of the Zernike term.
m (int) – Azimuthal order of the Zernike term.
r (float) – Radial distance from the origin.
phi (float) – Azimuthal angle in radians.
- Returns:
- The radial and azimuthal derivatives of the
Zernike polynomial.
- Return type:
tuple[float, float]
- get_term(coeff: ScalarOrArray = 0, n: int = 0, m: int = 0, r: ScalarOrArray = 0, phi: ScalarOrArray = 0) ScalarOrArray
Calculate the Zernike term for given coefficients and parameters.
- Parameters:
coeff (float) – Coefficient value for the Zernike term.
n (int) – Radial order of the Zernike term.
m (int) – Azimuthal order of the Zernike term.
r (float) – Radial distance from the origin.
phi (float) – Azimuthal angle in radians.
- Returns:
The calculated value of the Zernike term.
- Return type:
float
- poly(r: ScalarOrArray = 0, phi: ScalarOrArray = 0) float
Calculate the Zernike polynomial for given radial distance and azimuthal angle.
- Parameters:
r (float) – Radial distance from the origin.
phi (float) – Azimuthal angle in radians.
- Returns:
The calculated value of the Zernike polynomial.
- Return type:
float
- terms(r: ScalarOrArray = 0, phi: ScalarOrArray = 0) list
Calculate the Zernike terms for given radial distance and azimuthal angle.
- Parameters:
r (float) – Radial distance from the origin.
phi (float) – Azimuthal angle in radians.
- Returns:
List of calculated Zernike term values.
- Return type:
list