prysm v0.18#

This release brings several enhancements related to processing interferoemter data, and completes the update of the Zernike module. Perhaps as a breath of fresh air, you are likely to experience zero breaking changes. Users are encouraged to upgrade, and remove any error correction logic from their own processing pipelines.

New Features#

  • new function prysm.geometry.rectangle() for generating rectangular windows

  • new method prysm.psf.PSF.centroid() for computing the centroid of a PSF

  • new method prysm.psf.PSF.autowindow() for centering the data on the data of a PSF, based on its centroid

The Zernike module has completed its overhaul. This brings the following changes:

  • both Fringe and Noll zernike classes now allow expansion up to arbitrary order

  • the performance of Zernike calculations is improved by 2-3x vs 0.17 when numba was installed. More than 10x compared to 0.17 without numba. Numba is now never used, which results in faster imports when it is installed.

  • New functions:

    • fringe_to_n_m() for converting (arbitrary) Fringe index -> (n,m). One based.

    • n_m_to_name() for retrieving the name from (n, m) orders.

  • New capability:

    • zernikefit() can fit from (n,m) indices, and fit isolated terms without fitting all of the lower order ones

Breaking: - the list prysm.zernike.zernikes no longer exists - the explicit functions such as primary_spherical() now only include up to primary trefoil. You must use another method (such as the caches) to access higher order polynomials. - all explicit zernike functions no longer have name or norm attributes. Use the enumerated new functions above to get the name or norm of a term from its index - prysm.zernike.zcache no longer exists. ZCacheMN replaces ZCache. In 0.19, ZCache will become an alias for ZCacheMN. - prysm.zernike.zernikename() is deleted, use n_m_to_name() and the various xxxx_to_n_m functions in its place. - the “base” kwarg to Zernike classes is deprecated and will be removed in 0.19

Bug fixes#

The Zygo datx importer was rewritten. It now never results in improperly scaled phase. The meta attribute on interferograms from from_zygo_dat() may differ in its keys due to these changes.

Under-the-hood#

For OpticalPhase, the phase attribute is now a property that points to .data. This makes all prysm classes have a common location holding their primary data array, improving cohesion. If you access the phase attribute directly, there is no change in your code or its behavior.

New Documentation#

  • prysm.geometry.mask_cleaner() now has a docstring. You probably won’t use this function.

  • prysm.interferogram.PSD now has a docstring.