hswfs.fast_zernike
This module provides pre-computed numpy versions of the Cartesian derivatives of Zernike polynomials, which can be used to (significantly) speed up the fitting of wavefronts.
Warning
Note: This file / module is automatically generated by the
precompute_fast_zernike.py script in the scripts directory!
- hswfs.fast_zernike.zernike_derivative_cartesian(m: int, n: int, x: Union[float, ndarray], y: Union[float, ndarray], wrt: Union[str, Symbol]) Union[float, ndarray][source]
Evaluate the Cartesian derivative of a the Zernike polynomial \(Z^m_n\) at the position(s) x, y. Fast.
- Parameters
m – Index \(m\) of \(Z^m_n\).
n – Index \(n\) of \(Z^m_n\). Default maximum value is \(n_\text{max} = 15\).
x – The x-coordinate(s) at which to evaluate the derivative.
y – The y-coordinate(s) at which to evaluate the derivative.
wrt – A string or sy.Symbol that specifies with respect to which variable the derivative is taken: “x” or “y”.
- Returns
The value(s) of the derivative of \(Z^m_n\) with respect to wrt at the given position(s) x, y.