Release notes#
v0.8.7#
Released September 10, 2025
- detector.*methods that use randomness now optionally accept a numpy rng Generator object
- New helper function - helper.get_rng()for standardizing numpy rng construction and access
v0.8.6#
Released June 20, 2025
- detector.cosmic_rays()now accepts a seed parameter
- Minor updates to documentation and unit tests 
v0.8.5#
Released May 5, 2025
- New - Plane.freeze()method
- Documentation updates 
- Updates to GitHub Actions 
- Add support for NumPy versions >= 2.0 
v0.8.4#
Released December 2, 2024
- New subarray() function 
- Minor bugfixes and documentation updates 
v0.8.3#
Released June 15, 2024
- Minor bugfix and documentation updates 
v0.8.2#
Released April 20, 2024
- New propagate_dft() functionality for performing propagations in areas limited by a mask 
- Plane directly sets its own internal attribues #53 
- Migrate to numpy random.default_rng() for random numbers 
- Backend enhancements and bugfixes 
v0.8.1#
Released February 27, 2024
v0.8.0#
Released February 2, 2024
- New - propagate_dft()method for performing far-field propagations using the matrix triple product DFT
- New - propagate_fft()method for performing far-field propagations using the FFT #46
- Deprecate - Wavefront.propagate_image()
- Propagation backend updates and enhancements 
- DFT implementation improvements 
- Plane - phaseattribute renamed to- opd
- Allow - ampas an alias for- amplitudein Plane constructor
- New - ptypeobject for managing plane and wavefront types
- Enforce - ptype-based rules in- Plane.multiply()
- Streamline - Wavefrontconstructor
- New - DispersiveTiltobject
- Deprecate - Grism–- DispersiveTiltshould be used instead
- Utility shapes now accept an - antialiasargument
- New - spider()method for drawing spiders
- New - hex_segments()method for drawing segmented apertures made of rings of hexagonal segments
- Standardize shape naming 
- Deprecate in-place operations #43 
- Many documentation updates and improvements 
v0.7.0#
Released March 7, 2022
v0.6.0#
Released January 21, 2022
- Entirely new approach to how diffraction propagations are performed: - New - propagate_image()method for propagating between Pupil and Image planes
- Deprecate core - propagate()method
- Include negative sign in complex phasor complex exponential 
 
- Wavefront complex field data is now managed using a new internal Field class 
- Standardize around (row, col) aka. ij indexing 
- New methods for Plane resampling ( - Plane.resample()) and rescaling (- Plane.rescale())
- Collapse Plane segmask and mask functionality #24 
- Allow in-place operations on Wavefront #38 
- Relocate contents of - zerenike,- wfe,- convolvable, and- utilmodules to the core- lentilnamespace
- Allow floating point plane masks, which are automatically cast to bool 
- Documentation updates 
- Extend unit test coverage slightly 
- Switch to GitHub Actions for unit testing and code coverage 
v0.5.0#
Released August 13, 2021
- Propagations with - tilt='angle'have tilt projected out of each plane once before the entire propagation rather than at each monochromatic propagation
- Rework - Plane.pixelscaleto always store (r,c) pixelscale
- Fix bug in - Plane.maskon the fly calculation that was overwriting- Plane.amplitudewith a binary mask
- No longer cache - Plane.ptt_vector
- Deprecate - Plane.cache_propagate()and- Plane.clear_cache_propagate(). This functionality has been migrated to- propagate._prepare_planes()and- propagate._cleanup_planes()
- New - Plane.rescale()method to rescale Plane pixelscale
- Update - util.rescale()to choose a more conservative (better sampled) result when having to choose an integer output shape
- Define - Wavefront.__slots__to increase attribute access speed and reduce memory footprint
- util.circle()center parameter is now called shift
- Deprecate - cache.Cachein favor of a simple dictionary
- New function - fourier.expc()to more quickly compute a complex exponential
- fourier.dft2()now accepts an offset parameter
- New function - Plane.fit_tilt()to handle tilt fitting and removal of in the Plane’s- phaseattribute. This is now called once
- New function - Plane.slice()for computing avaliable slices from the plane attributes to speed up propagation performance
- New - Detector()plane that returns intensity
- Update - zernike.zernike_coordinates()to automatically compute shift that locates the origin at the mask centroid if no shift is provided.
v0.4.1#
Released October 7, 2020
- Fix implementation error in Grism model dispersion calculations 
v0.4.0#
Released October 6, 2020
Note
The Grism model updates are broken in this release. It has been yanked from PyPi. The issue is fixed in v0.4.1.
v0.3.4#
Released September 8, 2020
- Fix implementation error in Gaussian detector.shot_noise 
- Add better exception handling for detector.shot_noise #10 
- No longer check Python version on import 
- Update - np.ediff1dusage to be compatible with Numpy 1.19
v0.3.3#
Released August 17, 2020
- Make FPN seed optional in - detector.dark_current
v0.3.2#
Released July 20, 2020
- Update - detector.adcto prevent negative values from being returned.
v0.3.1#
Released July 16, 2020
- Imaging artifact classes have been rearchitected as functions. 
- Legacy functionality from the - detector.Windowableclass has been resurrected into- lentil.util.window()
- Deprecate - util.col_major_to_util_major()
- Lentil is now compatible with Python 3.6 and newer. #9 
v0.3.0#
Released July 8, 2020
- The Plane attribute caching approach has been entirely reworked, eliminating the need for end-users to explicitly decorate attributes defined in subclasses: - Users are now able to explicitly choose which attributes are cached when - cache_propagate()is called by specifying them in- Plane.cache_attrs. The only accepted values right now are- amplitudeand- phase. Note that- ptt_vectoris always cached and is not allowed to be specified in- cache_attrs.
- Rather than checking for and returning cached values at the attribute getter level, it is now done inside - Plane.multiply(). This change streamlines both the plane attribute getter code and the creation of planes with phase attributes that should be random with each access.
- The - cache_propagatedecorator has been deprecated, and the documentation and tests have been updated to reflect the changes in functionality. #7
 
- Fix bug in - zernike_coordinatesthat was causing modes over off-centered masks to be incorrectly computed. #8
- Change default behavior of - zernike_basisto return a stack of matrices rather than a single vectorized matrix.
v0.2.0#
Released June 29, 2020
- Collapse - Detectorand- Imageplanes into single- Imageplane. The pupil to image plane propagation method is now chosen based on whether the- Imageplane has a defined- pixelscale(propagate via matrix triple product DFT) or if- pixelscaleis None (propagate via FFT - eventually).- Detectorclass has been deprecated. #5
- Deprecate - FPAand- BayerFPA. Some functionality has been retained but converted to atomic functions in the detector module. #6
- Completely rework the contents of the detector module. All objects have been deprecated. Some functionality has been retained but converted to atomic functions instead. #6 
- Deprecate - util.coordinates
- Change the way - Rotateangle is interpreted to behave more intuitively
- A number of small bugfixes and enhancements 
- Updated documentation 
- More unit tests 
v0.1.1#
Released June 21, 2020
v0.1.0#
Released June 12, 2020
- Initial public release