R¶
- pyoof.zernike.R(n, m, rho)[source]¶
Radial Zernike polynomials generator (\(R^m_n(\varrho)\) from Born & Wolf definition). The \(m\), \(n\) are integers, \(n\geqslant 0\) and \(n - m\) even. Only used to compute the general expression for the Zernike circle polynomials,
U
.- Parameters
- Returns
- radial_poly
ndarray
Radial Zernike polynomial already evaluated, \(R^m_n(\varrho)\).
- radial_poly
Notes
The original generating formula for the radial polynomials is given by,
\[R^{\pm m}_n (\varrho) = \frac{1}{\left(\frac{n-m}{2}\right)! \cdot \varrho^m}\left\{\frac{\mathrm{d}}{\mathrm{d}\left(\ varrho^2 \right)} \right\}^{\frac{n-m}{2}} \left\{ \left( \ varrho^2 \right)^{\frac{n+m}{2}} \cdot \left( \varrho^2 -1 \right)^{\frac{n-m}{2}} \right\},\]Which can also be expressed as a polynomial sum.
Examples
To start using the radial polynomials simply call the package.
>>> import numpy as np >>> from astropy import units as u >>> from pyoof import zernike >>> # only orthogonal under unitary circle >>> r = np.linspace(-10, 10, 5) * u.m >>> zernike.R(n=4, m=2, rho=r / r.max()) <Quantity [ 1. , -0.5, 0. , -0.5, 1. ]>