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 sympy computation.

Warning

This method is a core function of pyzernike that is not designed to be use by the users directly. Please use the high level functions.

See also

  • n, m, rho_derivative and theta_derivative are 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_polynomial function 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_radial is 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]