Recent Releases of prysm
prysm - prysm 0.21
See RTD for release notes - https://prysm.readthedocs.io/en/stable/releases/v0.21.html
Full Changeset: https://github.com/brandondube/prysm/compare/v0.20...v0.21
Scientific Software - Peer-reviewed
- Python
Published by brandondube almost 4 years ago
prysm - prysm v0.20
See notes on RTD - https://prysm.readthedocs.io/en/stable/releases/v0.20.html
Scientific Software - Peer-reviewed
- Python
Published by brandondube almost 5 years ago
prysm - prysm v0.19
See release notes on RTD
Scientific Software - Peer-reviewed
- Python
Published by brandondube almost 6 years ago
prysm - prysm v0.18
See RTD for release notes
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 6 years ago
prysm - prysm v0.17.1
See RTD for release notes
There are 0 code changes in this release
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 6 years ago
prysm - prysm v0.17
See RTD for release notes
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 6 years ago
prysm - prysm v0.17 beta 1
See documentation on RTD, especially the release notes. This release is a huge break to backwards compatibility, so we are going through a beta cycle before mainlining the release. Hot areas to test for:
- unexpected behavior when using nondefault units
- interactions of class instances with different units.
- Q polynomials
- errors where there shouldn't be any (i.e., internal bugs)
- unnecessary breaks (i.e. things that existed in the 0.16 API that are possible to implement as properties with warnings for 0.17 to ease the transition.)
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 6 years ago
prysm - prysm v0.16.1
see RTD for release notes
Scientific Software - Peer-reviewed
- Python
Published by brandondube about 7 years ago
prysm - prysm v0.16
see RTD for release notes
Scientific Software - Peer-reviewed
- Python
Published by brandondube about 7 years ago
prysm - prysm 0.15.1
This is a hotfix release that fixes an issue with the sample_data submodule and egg distributions. Note that prysm now dirties the sites-packages folder with a prysm-sampledata folder.
Scientific Software - Peer-reviewed
- Python
Published by brandondube about 7 years ago
prysm - prysm 0.15
New Features
Surface/Wavefront error synthesis:
prysm.interferogramnow contains thesynthesize_surface_from_psdcore method andrender_synthetic_surfaceandInterferogram.render_from_psdconvenience wrappers for synthesizing surface or wavefront data from PSD curves. Examples of this technique can be seen in e.g. E. Sidick Power Spectral Density Specification and Analysis of Large Optical Surfaces.convenience wrapper
Interferogram.fit_zernikesreplacingzernikefit(i.phase, ...)invocation.write_zygo_asciifunction inprysm.ioto write Zygo ASCII files.Interferogram.save_zygo_asciito write an interferogram to Zygo ASCII format.zorderparameter in line-based plotting functions --OpticalPhase.plot_slice_xy,Convolvable.plot_slice_xy,Interferogram.plot_psd_xy_avgmodeargument onInterferogram.plot_psd_xy_avgto switch between x axis units of spatial frequency (mode='freq') or spatial period (mode='period').Interferogram.psd_slicesandInterferogram.plot_psd_slicesmethods replacingpsd_xy_avgmethod. Two new inquiries areazminandazmaxfor the azimuthal minimum and azimuthal maximum.PSF.polychromaticstaticmethod to create polychromatic PSFs from ensembles of monochromatic ones. This essentially reintroduces theMultispectralPSFclass's functionality from earlier versions of prysm.more configuration options.
prysm.confignow has parameters forQ,phase_colormap,image_colormap,lw,zorderfor controlling the default values of these parameters throughout the library.new constants in
prysm.psf--FIRST_AIRY_ZERO,SECOND_AIRY_ZERO, ANDTHIRD_AIRY_ZEROas well asSECOND_AIRY_ENCIRCLEDANDTHIRD_AIRY_ENCIRCLED. These concern the zeros of the airy disk and how much of the total energy is contained within. They are all wrapped inAIRYDATA, a dictionary with keys of 1,2,3 and values that are length-2 tuples of (radius, encircled energy).
Beta features
prysm.otf.long_exposure_otfandprysm.otf.estimate_Cnfor 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.cfgand some setuptools tricks. It now has theprysm.__version__attribute and can be more easily scanned by crawlers without executing setup.py.
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_avghas been removed, its functionality is now the same as the default forInterferogram.psd_slicesInterferogram.plot_psd_xy_avgfaces the same change forInterferogram.plot_psd_slices. Note that two calls are now needed to replicate the default behavior:
python
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._airydiskhas been renamed toprysm.psf.airydisk.the
lenssubmodule has been removed. This eliminates theLensclass.the
seidelsubmodule has been removed. This eliminates theSeidelclass.the
shackhartmannsubmodule has been removed. This eliminates theShackhartmannclass.the
macrossubmodule has been removed. This eliminates theSystemConfignamedtuple, thethrufocus_mtf_from_wavefrontandthrufocus_mtf_from_wavefront_arrayfunctions.prysm.detector.generate_mtfhas been removed. This function is redundant withprysm.detector.pixelaperture_analytic_otf.prysm.detector.OLPF.__init__now defaults tosamples_x=0, using the analytical representation in the numerical case.The great Zernike refactor of 2019:
prysm.fringezernikehas been folded intoprysm.zernike. Several functions have been renamed:
- *
fitis nowzernikefitcalled aszernikefit(... map_='fringe')(or `map_='noll')
- *
- * magnitude/angle and name functions are now part of the
zernikefuncsdictionary of dictionaries. Keys are, in order, function type and zernike order.fznameis now accessed most easily aszernikefuncs['name']['fringe'].fzset_to_magnitude_angleaszernikefuncs['magnitude_angle']['fringe'].noll` is a valid key for the nested dictionary.
- * magnitude/angle and name functions are now part of the
- *
FZCacheandfzcacheare nwo made redundant byZCacheandzcache. The cache takes an index into theprysm.zernikes.zernikeslist, not a Fringe or Noll index. Useprysm.zernikes.mapsto convert Fringe or Noll indices into prysm's zernike catalog.
- *
- the
StandardZernikeclass fromprysm.standardzernikehas been replaced withNollZernikefromprysm.zernike,or as imported from the top-level namespace.
- the
- *
NollZernikeallows coefficients from 0 to 36 or 1 to 37 and has all features present inFringeZernike, unlike the priorStandardZernikeclass.
- *
prysm._zernikeis nowprysm.zernike
under-the-hood changes
Angles of rotationally invariant terms in Fringe Zernike magnitude sets are now zero.
use of
isfiniteandisnanoptimized for internal routines.
bugfixes
wavelengthis properly captured inPupil.from_interferogram.Convolvable.from_fileno longer mangles x and y units.PSF.encircled_energyhas been reworked, improving accuracy by about 2.3%.BasicData.center_xandcenter_yare now properly computed. Fixes #2 .
Scientific Software - Peer-reviewed
- Python
Published by brandondube about 7 years ago
prysm - prysm 0.14
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
pad2dfromprysm.fttoolsnow takes themodekwarg, wrapping numpy.pad in the non-constant case.prop_pupil_plane_to_psf_planenow 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
truecirclemask inprysm.geometrywhich has anti-aliased edges for improved simulation accuracy.read_mtfmapper_sfr_singlefunction inprysm.ioto read outputs from MTF Mapper with the-f --single-roiarguments.semidiameterattribute onOpticalPhaseclass and subclasses (FringeZernike,Interferogram, ...).show_colorbaroption onOpticalPhase.plot2d.all masks in
prysm.geometrynow take aradiusargument.Interferogram.masknow takes descriptive arguments, e.g.i.mask('circle', diameter=100)for a 100mm diameter circle. Themaskkwarg still exists for user-provided masks.(Interferogram).pvrfor PVr analysis.in
prysm.fringezernike:fznamefunction to return the name of thenth Fringe Zernike withbase(0 or 1).fzset_to_magnitude_anglefunction to convert a list of (X-Y) Zernikes to (magnitude-angle) form.(FringeZernike).magnitudesproperty to accessfzset_to_magnitude_angleon a FringeZernike instance.top_nmethod forFringeZernikepupils to list the topncoefficients by magnitude.barplotmethod forFringeZernikepupils to plot their coefficients.barplot_magnitudesmethod to plot their pairwise magnitudes (e.g, one bar for primary astigmatism).barplot_topnmethod to plot the top n coefficients only.truncatemethod to reduceFringeZernikepupils to the firstnterms.truncate_topnmethod to reduce to topnterms.fsandnyquistproperties on theDetectorclass for the sampling and nyquist frequencies in cy/mm.crossedparameter inSlantedEdgeconstructor to produce a "BMW target"ab_psdfunction inprysm.interferogramfor analytical inverse power law PSD curves.
API changes
rms_normin functions related to Zernikes has been renamed tonorm. This affects thefitfunction fromprysm.fringezernikeas well as theFringeZernikeclass.num_termson thefitfunction is now renamed toterms.num_spokesonSiemensStarhas been renamed tospokes.num_ptsonprysm.otf.diffraction_limited_mtfhas been renamed tosamples.num_sampleshas been renamed tosamplesinprysm.propagation.pupil_sample_to_psf_sampleandpsf_sample_to_pupil_sample.the
epdkeyword argument onPupilinstances has been renamed todia. This also affects theFringeZernikeandSeidelsubclasses.Interferogram.plot_psd_xyavghas been renamed toplot_psd_xy_avg.
Under-the-hood changes
samples_x,samples_y,center_x, andcenter_yare now properties ofOpticalPhaseinstances (Pupils,Interferograms, ...) instead of attributes. This helps eliminate synchronization problems when the data is modified.imwriteis used from imageio, notimsaveto follow best practice.circlefromprysm.geometryis now exported at the top level.Detectornow 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.
OpticalPhasenow provides default values forxaxis_label,yaxis_label, andzaxis_labelto avoid errors on subclasses. Users should still provide better values for subclasses.MaskCacheargument order has changed fromsamples, shapetoshape, samples, radius.data from Zygo
datxfiles is now flipped to maintain consistent orientation with the representation in Mxin
prysm._zernikes,Tip (Y)has been renamedTilt Y.Tilt (X)has been renamedTilt Xthe
coefsattribute onFringeZernikeinstances 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.showerrors when no xlim or ylim provided.fix
OpticalPhase.samples_xandsamples_ylookup.coefficients from
fringezernike.fitare no longer transposed in the Cartesian plane.calling
(Interferogram).cropwith data spanning the entire array no longer causes an error.Initializing an
Interferogramwith nometadictionary no longer causes an error.
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 7 years ago
prysm - prysm 0.13.1
Hotfix for importerror in 0.13
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 7 years ago
prysm - prysm 0.13
This release brings a number of new features and enhancements. Users are encouraged to upgrade from older releases.
New Features
SlantedEdgeobject for image simulationdeconvmethod on theConvolvableclass to perform Wiener-Hunt deconvolutionconvenience properties on
OpticalPhase(FringeZernike,Interferogram, ...) andConvolvableobjectsshape,diameter_x,diameter_y, anddiameteron the former
shape,support_x,support_y,andsupporton the latter
stdproperty for the standard deviation inOpticalPhaseinstances andstrehlfor the approximate Strehl ratio forPupilinstancesband-limited RMS evaluation on
Interferogramobjects based on a 2D PSD calculationanalytical Fourier transform on the AiryDisk class for faster convolutions
flexible linewidth in many plots, log scaling on 2D PSF plots
residualparameter in thefitfunction from thefringezernikemoduleazimuthally averaged MTF via the
azimuthal_averagemethod on theMTFclassconvolvables can now be saved with 16-bit precision
Under-the-hood changes and bug fixes
Interferogram instances no longer cache PSD calculations internally
The wavefunction associated with an optical pupil is now a property,
(Pupil).fcninstead of an attribute. It will be calculated on an as-needed basis which eliminates synchronization problems whenPupilinstances are modified.FZCache and MCache for Fringe Zernikes and masks now implement
__call__, you can usemcache(128, 'hexagon')instead ofmcache.get_mask(128, 'hexagon')and the equivalent forzcache.importing of zygo datx files is now more robust. Files from the NexView NX2 now import properly
Convolvableis now exported at the top levelConvolvable.from_fileno longer errors. Users must now scale the data after importing on their own, e.g.Convolvable.data /= 255for an 8 bit per pixel file, or/= 65535for a 16-bit file
Remove features
bandreject_filterhas been removed on theInterferogramclass; the implementation was not well done and the results of low quality.MultispectralPSFanRGBPSFhave been dropped; they have been neglected for a significant amount of time. MultispectralPSF only differed from a PSF in the call to__init__,users can replicate this behavior independently.
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 7 years ago
prysm - prysm v0.12.2
Scientific Software - Peer-reviewed
- Python
Published by brandondube over 7 years ago
prysm - prysm v0.12.1
Scientific Software - Peer-reviewed
- Python
Published by brandondube almost 8 years ago