v0.1.0
New Features
- Simulation of hardware with
SimulatedSLMandSimulatedCamera, modeling experimental effects. - New
toolbox.phasefunctions-
sinusoid()grating. -
binary()grating. - 2D general
polynomial().
-
- Fitting the SLM's source amplitude data to recenter grids and derive scales.
- For instance, functions like
lens()which use the SLM grid are now centered on the source amplitude and will focus coaxially. - This also is now used in choosing a radius for structured light conversions and Zernike data (see next).
- For instance, functions like
- Revamped Zernike functionality.
- New
convert_zernike_index()function to convert between common indexing standards. - Auto-choosing a good Zernike aperture from fitted source amplitude data.
- Zernike derivatives (computed via the chain rule, so fast).
- New
- 3D support for
convert_vector()(previously known asconvert_blaze_vector()) and new units, including:-
"zernike", which expresses 3D points as the result of coordinates (in radians) directly multiplied with normalized tilt and focus Zernike polynomials. - metric units in camera-space, making use of knowledge of the camera pixel size and magnification between the camera and experiment.
-
- 3D spot arrays
CompressedSpotHologram. #41 - Spot arrays with unique Zernike aberration compensation for every spot (generalization of the above). Every spot goes to the desired point in 'aberration space'.
- Conjugate gradient optimization of holograms using
pytorchworking alongsidecupy. - Quadratic initial phase guess (instead of random) to promote a smoother hologram.
- Multiplane holography with the meta-hologram
MultiplaneHologram, which simultaneously optimizes the objectives of multiple child holograms. - Experimental holography features:
-
remove_vortices()and optical vortex analysis tools to remove phase kinks from the farfield. -
get_multiplane_defocus_blur()for realistic defocus.
-
- Wavefront calibration
wavefront_calibrate()that simultaneously measures at multiple calibration points. - More robust
fourier_calibrate()fitting. -
pixel_calibrate()measuring phase swing and crosstalk. -
settle_calibrate()measuring the$1/e$ SLM settle time. - Revamped
CameraSLMcalibration internal storage and saving. -
format_2vectors()generalized toformat_vectors()with N-dimensional support. - Allow moments to accept arbitrary grids, among other small changes.
- Divide and conquer algorithm for
smallest_distance()(now can handle millions of points in$O(N\log N)$ time). - Artificial bitdepth enhancement for cameras:
- Multi-exposure High Dynamic Range imaging,
- Software averaging.
- Upon
get_image()error, cameras now try againcapture_attemptstimes. This improves reliability against rare errors. -
SLM,Camera, andCameraSLMsubclasses now have default plotting.plot()method that makes it easy to see what's happening in the phase and image domains. -
Holograms also have improved.plot_farfield()enabling different units and helper boxes. - Added untested #17
- Added skeleton for #26
- Docs have moved from the readthedocs theme to the very nice pydata theme (used by numpy, etc).
- Lots of documentation cleanup and polishing.
- The package index moved from
QPG-MIT/slmsuitetoslmsuite/slmsuite.
Breaking Changes
- Changed
toolbox.phasefunctions:zernike()andzernike_sum()are completely changed.blaze()had theoffset=parameter removed as it was redundant with+=.
- Renamed variables in cameras and SLMs to reduce clutter:
dx_um,dy_um->pitch_umdx,dy->pitchx_grid,y_grid->gridphase_correction,measured_amplitude, ->source- Constructors are also modified in some cases.
- Default parameters are changed in most cases.
- High-level SLMs (
Santec,Meadowlark, ...) should largely be fine, but direct calls to theSLMconstructor might break.
- Renamed variables in
Holograms:methodwas moved toflags.extract_phase()andextract_farfield()->get_phase()andget_farfield().
- Renaming in
FourierSLM:- Different calibrations are now stored in a single dict
calibrations. - Saving was revamped to use a single method to save all calibrations to avoid method bloat as calibrations are added.
- For instance
save_wavefront_calibration()andload_wavefront_calibration()is now changed towrite_calibration("wavefront_superpixel")andread_calibration("wavefront_superpixel")orwrite_calibration("wavefront_zernike")andread_calibration("wavefront_zernike").
- For instance
wavefront_calibrate()has renamed and reorganized variables.- In particular
interference_point->calibration_points.
- In particular
- Processing methods were also renamed for better organization. For instance
process_wavefront_calibration()->wavefront_calibration_process()
- Different calibrations are now stored in a single dict
- Assorted general attempts at improving packaging naming uniformity.
- For instance, using
get_andset_,read_andwrite_, etc as the dominant language.
- For instance, using
Bugfixes
Under the Hood
- Major reorganization of internal files.
algorithmsis split into many smaller files.fitfunctionsandfilesare moved frommisctoanalysisandtoolbox.
- Introduced a number of custom CUDA kernels (in cuda.cu).
Full Changelog: v0.0.1...v0.1.0