phase¶
- pyoof.aperture.phase(K_coeff, pr, piston, tilt, resolution=1000)[source]¶
Aperture phase distribution (or phase-error), \(\varphi(x, y)\), for an specific telescope primary reflector. In general, the tilt (average slope in \(x\)- and \(y\)-directions, related to telescope pointings) is subtracted from its calculation. Function used to show the final results from the fit procedure.
- Parameters
- K_coeff
ndarray
Constants coefficients, \(K_{n\ell}\), for each of them there is only one Zernike circle polynomial, \(U^\ell_n(\varrho, \varphi)\).
- pr
float
Primary reflector radius in length units.
- piston
bool
Boolean to include or exclude the piston coefficient in the aperture phase distribution. The Zernike circle polynomials are related to piston through \(U^{0}_0(\varrho, \varphi)\).
- tilt
bool
Boolean to include or exclude the tilt coefficients in the aperture phase distribution. The Zernike circle polynomials are related to tilt through \(U^{-1}_1(\varrho, \varphi)\) and \(U^1_1(\varrho, \varphi)\).
- resolution
int
Resolution for the phase-error map, usually used
resolution = 1000
in thepyoof
package.
- K_coeff
- Returns
Notes
The aperture phase distribution or phase-error, \(\varphi(x, y)\) is related to the wavefront (aberration) distribution, from classical optics, through the expression,
\[\varphi(x, y) = 2\pi \cdot W(x, y) = 2\pi \cdot \sum_{n, \ell} K_{n\ell}U^\ell_n(\varrho, \vartheta).\]Examples
To use compute the aperture phase distribution, \(\varphi(x, y)\), first a set of coefficients need to be generated,
K_coeff
, then simply execute thephase
function.>>> import numpy as np >>> from astropy import units as u >>> import matplotlib.pyplot as plt >>> from pyoof import aperture >>> pr = 50 * u.m # primary relfector >>> n = 5 # order polynomial >>> N_K_coeff = (n + 1) * (n + 2) // 2 # max polynomial number >>> K_coeff = np.random.normal(0., .1, N_K_coeff) >>> x, y, phi = aperture.phase( ... K_coeff=K_coeff, pr=pr, piston=False, tilt=False ... )