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_coeffndarray

Constants coefficients, \(K_{n\ell}\), for each of them there is only one Zernike circle polynomial, \(U^\ell_n(\varrho, \varphi)\).

prfloat

Primary reflector radius in length units.

pistonbool

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)\).

tiltbool

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)\).

resolutionint

Resolution for the phase-error map, usually used resolution = 1000 in the pyoof package.

Returns
xndarray

\(x\)-axis dimensions for the primary reflector in meters.

yndarray

\(y\)-axis dimensions for the primary reflector in meters.

phiQuantity

Aperture phase distribution, \(\varphi(x, y)\), for an specific primary reflector radius, measured in radians.

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 the phase 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
...    )