opd_from_zernikes
- poppy.zernike.opd_from_zernikes(coeffs, basis=<functools._lru_cache_wrapper object>, aperture=None, outside=nan, **kwargs)
Synthesize an OPD from a set of coefficients
- Parameters:
- coeffslist or ndarray
Coefficients for the Zernike terms
- basiscallable
Which basis set. Defaults to Zernike
- aperture2D 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.
- 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.
- Other Parameters:
- Other parameters are supported via **kwargs, in particular setting the size of the OPD via npix.
Examples
opd = compose_opd_from_basis([0,0,-5,1,0,4,0,8], npix=512)