prysm v0.16

This release has been largely focused on updating the internals of prysm and brings relatively new features. The bulk of the work in this release has been spent on reworking the mathops module for a cleaner and more extensible design and on rewriting the guts of the convolutional code. The result is a slimmer library with cleaner code, faster execution, and higher accuracy results. Users are encouraged to upgrade, particularly for the enhancements made to image simulations done based on the convolution engine.

New Features

  • prysm.coordinates.make_xy_grid() and make_rho_phi_grid() now take a radius argument.

  • TiltedSquare.__init__ now takes radius and contrast arguments.

  • prysm.io.read_sigfit_zernikes() function to read Zernike coefficients from SigFit OUTCOF3 files.

  • prysm.io.read_sigfit_rigidbody() function to read rigid body motion and radius error coefficients from SigFit SUM2 files.

  • prysm.interferogram.Interferogram.pad() function to pad interferograms; useful for dealing with group delay from spatial filtering.

  • object_to_image_dist() to calculate an object distance given a focal length and image distance.

  • New ConvolutionEngine which allows users to control the execution flow of a convolution, adjust the data in k-space before returning to the spatial domain, and other advanced features. For more information see the updated User’s Guide. Several bugs have been squashed in the process of making these upgrades.

  • prysm.degredations for modeling degredations in the image chain. Smear and Jitter are its first members. They are also exported at the top level of the library.

  • Chirp to synthesize chirped frequency targets.

  • Grating to synthesize grating targets.

  • GratingArray to synthesize arrays of gratings.

  • the radius argument is exposed on SiemensStar.__init__.

  • fit_psd() to fit analytic curves to PSD data. Note that this function works best when given a reasonable guess; curve fitting extremely high dynamic range signals (such as PSDs) is not very stable.

Breaking changes

  • the unit_x and unit_y attributes on the BasicData class have been renamed to x and y. unit_x and unit_y are provided as properties with warnings until v0.17.

  • analytic_ft functions no longer calculate the meshgrid of x and y inputs internally. This makes output shapes and types consistent with input (i.e., calling .analytic_ft(0,0) will return a float instead of a (1,1) shape ndarray). Performance is also improved by removing redundant gridding operations.

Bugfixes

  • conv() now produces the correct number of output samples in all cases. Fixes #3.

  • unit changes have been corrected - prior results were incorrect.

  • the norm kwarg has improved behavior for Zernike classes, no longer setting z.normalize = True when the norm=False kwarg is passed.

  • an error is no longer raised when calling prysm.convolution.Convolvable.save() with nbits=8.

  • calls to prysm.pupil.Pupil.mask() now properly capture the mask for application to the fcn property.

  • units on PSD plots are now properly referenced to spatial and phase units, not nm. This fix affects axis labels, not data.

Under-the-hood Changes

  • prysm.pupil.Pupil.strehl now uses a more accurate formula.

  • the prysm.mathops module has been reworked, and its use throughout the library adjusted in concert with this change.

  • prysm.propagation.prop_pupil_plane_to_psf_plane() performance has been improved when Q=1.

  • some functions have had their conformance with prysm.config.precision improved.

  • the performance of prysm.detector.OLPF.analytic_ft() has been improved.