pyzernike.core.core_symbolic#
- pyzernike.core.core_symbolic(n: array, m: array, rho_derivative: array, theta_derivative: array | None, flag_radial: bool) List[Expr][source]#
Compute the symbolic expression of the Zernike polynomial \(Z_{n}^{m}(\rho, \theta)\) or the radial Zenike polynomial \(R_{n}^{m}(\rho)\) if the flag flag_radial is set to True with symbolic
sympycomputation.Warning
This method is a core function of
pyzernikethat is not designed to be use by the users directly. Please use the high level functions.See also
pyzernike.radial_symbolic()for the radial Zernike polynomial symbolic computation.pyzernike.zernike_symbolic()for the full Zernike polynomial symbolic computation.The page Mathematical description in the documentation for the mathematical description of the Zernike polynomials.
n,m,rho_derivativeandtheta_derivativeare expected to be sequences of integers of the same length and valid values.
Note
The r symbol is used to represent the radial coordinate \(\rho\) in the symbolic expression. The t symbol is used to represent the angular coordinate \(\theta\) in the symbolic expression.
Warning
Note match the numpy
core_polynomialfunction for n=11, m=9, dr=0, dt=10, to investigate later.- Parameters:
n (numpy.array[numpy.integer]) – The orders of the Zernike polynomials to compute. Must be a 1D array of integers.
m (numpy.array[numpy.integer]) – The azimuthal frequencies of the Zernike polynomials. Must be a 1D array of integers.
numpy.array[numpy.integer] – The orders of the derivatives with respect to rho. Must be a 1D array of integers.
theta_derivative (Optional[numpy.array[numpy.integer]]) – The orders of the derivatives with respect to theta. Must be None if
flag_radialis True. Otherwise, must be a 1D array of integers.flag_radial (bool) – If True, the radial Zernike polynomial \(R_{n}^{m}(\rho)\) is computed instead of the full Zernike polynomial \(Z_{n}^{m}(\rho, \theta)\). If False, the full Zernike polynomial \(Z_{n}^{m}(\rho, \theta)\) is computed, which includes the angular part with the cosine and sine terms.
float_type (numpy.floating) – The floating point type used for the computations (e.g., numpy.float32, numpy.float64).
- Returns:
A list of symbolic expressions of the Zernike polynomial or radial Zernike polynomial for each order and azimuthal frequency specified in n and m. Each expression is a sympy expression that can be evaluated or manipulated further.
- Return type:
List[sympy.Expr]