opd_from_zernikes¶
-
poppy.zernike.
opd_from_zernikes
(coeffs, basis=<functools._lru_cache_wrapper object>, aperture=None, outside=nan, **kwargs)[source]¶ Synthesize an OPD from a set of coefficients
- coeffs : list or ndarray
- Coefficients for the Zernike terms
- basis : callable
- Which basis set. Defaults to Zernike
- aperture : 2D ndarray, optional
- Aperture mask for which pixels are included within the aperture. All positive nonzero values are considered within the aperture; any pixels with zero, negative, or NaN values will be considered outside the aperture, and set equal to the ‘outside’ parameter value. If this parameter is not set, the aperture will be default to the 2D unit circle.
- outside : float
- 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.
Other parameters are supported via **kwargs, in particular setting the size of the OPD via npix.
opd = opd_from_zernikes([0,0,-5,1,0,4,0,8], npix=512)