Segment_PTT_Basis

class poppy.zernike.Segment_PTT_Basis(rings=2, flattoflat=<Quantity 1. m>, gap=<Quantity 1. cm>, center=False, pupil_diam=None, **kwargs)[source]

Bases: object

Eigenbasis of segment pistons, tips, tilts. (Or of pistons only using the Segment_Piston_Basis subclass.)

The aperture geometry is specified identically to the MultiHexagonAperture class. Set that when creating an instance of this class, then you can call the resulting function object to generate a basis set with the desired sampling, or pass it to the compose_opd_from_basis or decompose_opd_segments functions.

The basis is generated over a square array that exactly circumscribes the hexagonal aperture.

Parameters:
ringsint

Number of rings of segments

flattoflatfloat or astropy.Quantity length

Size of a single segment

gapfloat or astropy.Quantity length

Gap between adjacent segments

centerbool

Include the center segment?

pupil_diamfloat oar astropy.Quantity length

Diameter of the array on which to generate the basis; by default this is chosen to circumscribe the multihex aperture given the specified segment and gap sizes and number of segments.

Additional keyword arguments to this function are passed through to the
HexSegmentedDeformableMirror callable.

Methods Summary

__call__([nterms, npix, outside])

Generate PTT basis ndarray for the specified aperture

aperture([npix])

Return the overall aperture across all segments

Methods Documentation

__call__(nterms=None, npix=512, outside=nan)[source]

Generate PTT basis ndarray for the specified aperture

Parameters:
ntermsint

Number of terms. Set to 3x the number of segments.

npixint

Size, in pixels, of the aperture array.

outsidefloat

Value for pixels outside the specified aperture. Default is np.nan, but you may also find it useful for this to be 0.0 sometimes.

aperture(npix=512)[source]

Return the overall aperture across all segments