prysm v0.15

Version 0.15 introduces a host of new features and many internal changes that improve the maintainability of the library, users are encouraged to upgrade.

With version 0.16, a FWHM feature is expected to be added to the PSF class and improvements made to convolution and image simulation code. The abilities of the Detector class are likely to be greatly enhanced. A SigFit parser will be be implemented.

New Features

Beta Features

  • prysm.otf.long_exposure_otf() and prysm.otf.estimate_Cn() for calculating the OTF (MTF) associated with a ‘long’ exposure through atmospheric turbulence. Note that while the equations have been implemented, the results have not been checked against published values. Please provide feedback.

Improved Packaging

  • prysm now uses setup.cfg and some setuptools tricks. It now has the prysm.__version__ attribute and can be more easily scanned by crawlers without executing

Improved Documentation

  • The User’s guide and Examples sections of the documentation are now jupyter notebooks and have embedded graphics and output.

  • There are several new examples.

Improved Test Coverage

  • Test coverage is now > 80%

Breaking API Changes

  • Interferogram.psd_xy_avg() has been removed, its functionality is now the same as the default for Interferogram.psd_slices()

  • Interferogram.plot_psd_xy_avg() faces the same change for Interferogram.plot_psd_slices(). Note that two calls are now needed to replicate the default behavior:

fig, ax = i.plot_psd_slices(x=True, y=True, alpha=0.4, lw=3)
fig, ax = i.plot_psd_slices(x=False, y=False, azavg=True, lw=4.5, fig=fig, ax=ax)
  • prysm.psf._airydisk() has been renamed to prysm.psf.airydisk().

  • the lens submodule has been removed. This eliminates the Lens class.

  • the seidel submodule has been removed. This eliminates the Seidel class.

  • the shackhartmann submodule has been removed. This eliminates the Shackhartmann class.

  • the macros submodule has been removed. This eliminates the SystemConfig namedtuple, the thrufocus_mtf_from_wavefront() and thrufocus_mtf_from_wavefront_array() functions.

  • prysm.detector.generate_mtf() has been removed. This function is redundant with prysm.detector.pixelaperture_analytic_otf().

  • prysm.detector.OLPF.__init__() now defaults to samples_x=0, using the analytical representation in the numerical case.

  • The great Zernike refactor of 2019:

    • prysm.fringezernike has been folded into prysm.zernike. Several functions have been renamed:

      • fit() is now zernikefit() called as zernikefit(... map_='fringe') (or map_='noll')

      • magnitude/angle and name functions are now part of the zernikefuncs dictionary of dictionaries. Keys are, in order, function type and zernike order. fzname() is now accessed most easily as zernikefuncs['name']['fringe']. fzset_to_magnitude_angle() as zernikefuncs['magnitude_angle']['fringe']. noll is a valid key for the nested dictionary.

      • FZCache and fzcache are nwo made redundant by ZCache and zcache. The cache takes an index into the prysm.zernikes.zernikes list, not a Fringe or Noll index. Use prysm.zernikes.maps to convert Fringe or Noll indices into prysm’s zernike catalog.

    • the StandardZernike class from prysm.standardzernike has been replaced with NollZernike from prysm.zernike, or as imported from the top-level namespace.

      • NollZernike allows coefficients from 0 to 36 or 1 to 37 and has all features present in FringeZernike, unlike the prior StandardZernike class.

Under-the-hood Changes

  • Angles of rotationally invariant terms in Fringe Zernike magnitude sets are now zero.

  • use of isfinite and isnan optimized for internal routines.