Version 0.14 introduces a host of new features and critical improvements to existing features of prysm. Users are encouraged to upgrade from prior releases.
With version 0.15, work will continue on improving the documentation and tests. When documentation becomes "complete" and coverage exceeds 90%, version 1.0 will be released and prysm will follow more typical semver release patterns.
New Features
-
pad2d
fromprysm.fttools
now takes themode
kwarg, wrapping numpy.pad in the non-constant case. -
prop_pupil_plane_to_psf_plane
now takes theincoherent
(defaultTrue
) argument. Whenincoherent=False
, the (complex-valued) coherent impulse response is returned. -
wrap-around effects in convolutions have been reduced.
-
there is a new
truecircle
mask inprysm.geometry
which has anti-aliased edges for improved simulation accuracy. -
read_mtfmapper_sfr_single
function inprysm.io
to read outputs from MTF Mapper with the-f --single-roi
arguments. -
semidiameter
attribute onOpticalPhase
class and subclasses (FringeZernike
,Interferogram
, ...). -
show_colorbar
option onOpticalPhase.plot2d
. -
all masks in
prysm.geometry
now take aradius
argument. -
Interferogram.mask
now takes descriptive arguments, e.g.i.mask('circle', diameter=100)
for a 100mm diameter circle. Themask
kwarg still exists for user-provided masks. -
(Interferogram).pvr
for PVr analysis. -
in
prysm.fringezernike
:fzname
function to return the name of then
th Fringe Zernike withbase
(0 or 1). -
fzset_to_magnitude_angle
function to convert a list of (X-Y) Zernikes to (magnitude-angle) form. -
(FringeZernike).magnitudes
property to accessfzset_to_magnitude_angle
on a FringeZernike instance. -
top_n
method forFringeZernike
pupils to list the topn
coefficients by magnitude. -
barplot
method forFringeZernike
pupils to plot their coefficients. -
barplot_magnitudes
method to plot their pairwise magnitudes (e.g, one bar for primary astigmatism). -
barplot_topn
method to plot the top n coefficients only. -
truncate
method to reduceFringeZernike
pupils to the firstn
terms. -
truncate_topn
method to reduce to topn
terms. -
fs
andnyquist
properties on theDetector
class for the sampling and nyquist frequencies in cy/mm. -
crossed
parameter inSlantedEdge
constructor to produce a "BMW target" -
ab_psd
function inprysm.interferogram
for analytical inverse power law PSD curves.
API changes
-
rms_norm
in functions related to Zernikes has been renamed tonorm
. This affects thefit
function fromprysm.fringezernike
as well as theFringeZernike
class. -
num_terms
on thefit
function is now renamed toterms
. -
num_spokes
onSiemensStar
has been renamed tospokes
. -
num_pts
onprysm.otf.diffraction_limited_mtf
has been renamed tosamples
. -
num_samples
has been renamed tosamples
inprysm.propagation.pupil_sample_to_psf_sample
andpsf_sample_to_pupil_sample
. -
the
epd
keyword argument onPupil
instances has been renamed todia
. This also affects theFringeZernike
andSeidel
subclasses. -
Interferogram.plot_psd_xyavg
has been renamed toplot_psd_xy_avg
.
Under-the-hood changes
-
samples_x
,samples_y
,center_x
, andcenter_y
are now properties ofOpticalPhase
instances (Pupils
,Interferograms
, ...) instead of attributes. This helps eliminate synchronization problems when the data is modified. -
imwrite
is used from imageio, notimsave
to follow best practice. -
circle
fromprysm.geometry
is now exported at the top level. -
Detector
now defaults to 16-bit precision. -
import of h5py for datx files is now deferred for faster imports of prysm.
-
matplotlib is now an optional dependency and its import is deferred for faster imports of prysm.
-
OpticalPhase
now provides default values forxaxis_label
,yaxis_label
, andzaxis_label
to avoid errors on subclasses. Users should still provide better values for subclasses. -
MaskCache
argument order has changed fromsamples, shape
toshape, samples, radius
. -
data from Zygo
datx
files is now flipped to maintain consistent orientation with the representation in Mx -
in
prysm._zernikes
,Tip (Y)
has been renamedTilt Y
.Tilt (X)
has been renamedTilt X
-
the
coefs
attribute onFringeZernike
instances is now a numpy array. Piston tip and tilt can be suppressed by invokingfz.coefs[:3] = 0; fz.build(); fz.mask(fz._mask, fz._mask_target);
. -
PSD calculation has been rewritten. PSD results are now properly normalized to be a true PSD. Prior results should be considered in error.
bugfixes
-
fix
Convolvable.show
errors when no xlim or ylim provided. -
fix
OpticalPhase.samples_x
andsamples_y
lookup. -
coefficients from
fringezernike.fit
are no longer transposed in the Cartesian plane. -
calling
(Interferogram).crop
with data spanning the entire array no longer causes an error. -
Initializing an
Interferogram
with nometa
dictionary no longer causes an error.