prysm v0.19¶
This release focuses on increasing the capability of prysm for multi-plane diffraction modeling and includes other improvements to quality of life.
New Features¶
API Fluency¶
astype()
function for converting between the various object types. This can be used to dip into another type momentarily for one of its methods, e.g. chainingp = Pupil() p.astype(Interferogram).crop(...).astype(Pupil)
.
Propagation¶
In this release, prysm has gained increased capability for performing propagations outside of the pupil-to-image case. The API has also been revised for reduced verbosity and better clarity. The old API is provided with deprecations to ease transition. A demo showing more than two order of magnitude performance improvement is available Polychromatic Propagations.
angular_spectrum()
for plane-to-plane (i.e free space) propagation via the angular spectrum methodangular_spectrum_transfer_function()
, the transfer function of free spacefresnel_number()
for computing the Fresnel numbertalbot_distance()
for computing the Talbot distanceQ_for_sampling()
indicates the value of Q (or fλ/D, they are the same thing) for a given sample spacing in the psf planefocus_fixed_sampling()
for using matrix triple product DFTs to propagate to a fixed grid. This is useful for propagating to detector grids, and for faster polychromatic computations (since the “natural” grid depends on wavelength)unfocus_fixed_sampling()
mimic of focus_fixed_sampling, but from “psf” to “pupil” plane.the
Wavefront
class has gained new functions for propagating through a system:focus()
pupil -> psf
unfocus()
psf -> pupil
focus_fixed_sampling()
pupil -> psf, fixed grid
unfocus_fixed_sampling()
psf -> pupil, fixed grid
free_space()
pupil -> pupil separated by some physical distance
Aliases with deprecation warnings:
prop_pupil_plane_to_psf_plane()
->focus()
prop_pupil_plane_to_psf_plane_units()
->focus_units()
Thin Film Calculation and Refractive Indices¶
Prysm can now do basic multi-layer thin film calculations and compute a few related values.
prysm.thinfilm.multilayer_stack_rt()
for computing the equivalent Fresnel coefficients for a stack of thin and thick films.prysm.thinfilm.critical_angle()
for computing the minimum angle of incidence for TIRprysm.thinfilm.brewsters_angle()
for computing the angle at which a surface is completely unreflective of p-polarized lightprysm.refractive.cauchy()
for computing refractive index based on Cauchy’s modelprysm.refractive.sellmeier()
for computing refractive index based on the Sellmeier equation
I/O¶
Prysm can now parse MTF vs Field files from Trioptics MTF-Lab v5 software. The previous parser is compatible with v4 and is untouched.
parse_trioptics_metadata_mtflab_v5()
Note that the existing functions without mtflab_v5 suffixes now issue warnings that their behavior will change in v0.20. At that time, they will sense whether the file is from v4 or v5 and dispatch appropriately.
Documentation¶
The docstrings of the ZCacheMN
class were expanded. These should aid developers in understanding the code.
Bug fixes¶
save()
now flips the array before writing, rendering images in the expected orientation.from_pupil()
now passes theincoherent
andnorm
arguments to the propagation enginethe
Pupil
constructor no longer ignores the phase parameterthe
Pupil
constructor no longer ignores the transmission parameterWavefront
no longer errors on constructionzernikefit()
no longer causes a memory leakn_m_to_fringe()
no longer begins counting fringe indices at 0 and does not mis-order azimuthal orders when radial order >14.
Removed Deprecations¶
MTF.exact_tan
has been removed and was marked for removal in v0.18MTF.exact_sag
has been removed and was marked for removal in v0.18MTF.tan
has been removed and was marked for removal in v0.18MTF.sag
has been removed and was marked for removal in v0.18RichData.slice_x
has been removed and was marked for removal in v0.18RichData.slice_y
has been removed and was marked for removal in v0.18the
base
kwarg which controlled whether indices start at 0 or 1 has been removed from the Zernike classes and was marked for removal in v0.19
Test Coverage¶
The integration between travis and coveralls has been fixed
the test suite now provides over 80% coverage and includes over 500 tests