pupil: Create a circular pupil and fill it with a wavefront

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Creates a representation of a wavefront from a vector of Zernike polynomial values.

Usage

1
pupil(size = 255, obstruct = 0, zcoef = NULL, zlist = zlist.qf, phi = 0, piston = 0)

Arguments

size

size of the returned matrix

obstruct

central obstruction fraction

zcoef

Vector of Zernike coefficients

zlist

A list with named components n, m, t describing the contents of zcoef

phi

angular coordinate to rotate entire coordinate system

piston

Piston (constant) term to add to the wavefront

Details

The coordinate system is rotated clockwise by the angle phi specified in degrees. This is done to present consistent displays of rotated wavefronts in Rfringe.

Value

A size by size matrix of wavefront values. NA's are used to fill out the matrix outside the circular pupil and inside the obstruction.

Note

Most high level R graphics functions will handle NA's as intended.

This function can take a while if zcoef includes high order Zernikes. Decreasing the matrix size will help with speed, but may provide too low resolution for good graphical representations. No attempt is made to “anti-alias” the edges of the pupil.

Author(s)

M.L. Peck mpeck1@ix.netcom.com

See Also

Zernike, makezlist, zlist.qf, fillzm, pupilrms, pupilpv.

Examples

1
2
3
4
5
# A fairly typical use of this function:

wf <- pupil(zcoef=rnorm(length(zlist.qf$n)))
image(wf, col=topo.colors(256), asp=1)
contour(wf, add=TRUE)

matwey/Rfringe documentation built on May 12, 2019, 8:43 a.m.