pyzernike.core.core_display#
- pyzernike.core.core_display(n: array, m: array, rho_derivative: array, theta_derivative: array | None, flag_radial: bool, precompute: bool, float_type: type[floating]) None[source]#
Display Zernike polynomials for given n, m, rho_derivative, and theta_derivative values.
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_display()for the radial Zernike polynomial display.pyzernike.zernike_display()for the full Zernike polynomial display.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.
The displays are including in a interactive matplotlib figure with buttons to navigate through the different Zernike polynomials.
- Parameters:
n (numpy.array[numpy.integer]) – The orders of the Zernike polynomials to compute. Must be a 1D array of integers of type compatible with
float_type.m (numpy.array[numpy.integer]) – The azimuthal frequencies of the Zernike polynomials. Must be a 1D array of integers of type compatible with
float_type.numpy.array[numpy.integer] – The orders of the derivatives with respect to rho. Must be a 1D array of integers of type compatible with
float_type.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 of type compatible withfloat_type.flag_radial (bool) – If True, computes the sets for radial polynomials only (no angular part). The output sine and cosine frequency sets will be empty. If False, computes the sets for full Zernike polynomials (including angular part).
precompute (bool) – If True, the useful terms for the Zernike polynomials are precomputed to optimize the computation. This is useful when computing multiple Zernike polynomials with the same rho and theta values. If False, the useful terms are computed on-the-fly for each polynomial, which may be slower but avoid memory overhead.
float_type (type[numpy.floating]) – The floating point type used for the computations (e.g., numpy.float32, numpy.float64).
- Return type:
None
- pyzernike.core.core_display_interactive(float_type: type[floating]) None[source]#
Display Zernike polynomials using a GUI interface (selecting radial or full Zernike polynomials, order, and derivatives).
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_display_interactive()for the radial Zernike polynomial display.pyzernike.zernike_display_interactive()for the full Zernike polynomial display.The page Mathematical description in the documentation for the mathematical description of the Zernike polynomials.
This method launches a graphical user interface (GUI) with
matplotlibwidgets to allow the user to select parameters for displaying Zernike polynomials. The user can choose between radial and full Zernike polynomials, specify the maximum order, and set the orders of derivatives with respect to rho and theta. Once the parameters are set, the corresponding Zernike polynomials are displayed in an interactive figure.- Parameters:
float_type (type[numpy.floating]) – The floating point type used for the computations (e.g., numpy.float32, numpy.float64).
- Return type:
None