ZernikeCompose

Top  Previous  Next

LL_ZernikeCompose

View Inside ZernikeCompose:

LL_ZernikeCompose_Inside

 

ZernikeCompose generates a sum of Zernike polynomials. Several ordering schemes and normalization schemes can be selected by choosing appropriate parameters. ZernikeCompose will regenerate the phase fitted by ZernikeDecompose when using the coefficients generated by ZernikeDecompose along with the same ordering and normalization schemes.

Possible normalization schemes selected by the 'normalization' parameter are: 0 - no normalization; 1 - normalize the overlap integral to 1/pi (1/area with unit circle); 2 - unity phase variance; 3 - Noll/Malacara, unity overlap integral. 0 (no normalization) is the default due to backward compatibility considerations, but 3 (Noll/Malacara) will typically be an appropriate choice.

All ordering schemes start with tilts and progress through higher order radial terms, but differ in the ordering of azimuthal terms within each radial order. Possible orderings selectable via the 'orderingScheme' parameter are: 0 - deprecated; 1 - Noll's ordering; 2 - Malacara's ordering. 0 (deprecated) is the default due to backward compatibility considerations, but 2 or 3 (Noll or Malacara) will typically be an appropriate choice.

Note on ANSI Z80.28-2004; use normalization=3 and orderingScheme=2: The Noll/Malacara normalization is used and the reversed Malacara ordering us used. However, the choice of cos() or sin() angular terms is also swapped so the actual sequence is identical to Malacara: ANSI Z_n^m == Malacara Z_n^{-L}. This ignores the alternative angle/rotation definition chosen for the ANSI standard, but does not change the orthornormal properties of the polynomials.

Note on Born-Wolf: No normalization is applied (normalization=0); all radial terms evaluate to unity at the edge of the Zernike circle. There is no 1-parameter ordering so they cannot be generated directly with ZernikeCompose.

C++ type

name

value

description

Parameters

double

zernikeRadius


Radius of the Zernike polynomials (m)  

int

normalization


0-no normalization; 1-normalize to overlap integral=1/pi; 2-make the PV=1.0;3-Noll/Malacara

bool

applyAperture


Flag used to turn on and off the aperture at the Zernike radius

int

orderingScheme


0-deprecated;1-Noll;2-Malacara

Inputs

Vector<double>

coefficients


Vector of coefficients of the Zernike terms; the length of this vector determines the number of Zernikes being represented

double

xc


Center of Zernike circle in X (m)  

double

yc


Center of Zernike circle in Y (m)

Grid<double>

referenceGrid


Used to specify the output grid parameters. To specify them manually, use gwoom(nx,ny,dx,dy) or GridGeometry( nx, ny, dx, dy, xCenter, yCenter)

Outputs

Grid<double>

phaseScreen


Phase of complex field (rad)