Releases: holodyne/slmsuite
Releases · holodyne/slmsuite
v0.4.1
Changelog
0.4.1 - Patch to 0.4.0
Bugfixes
- Remove undefined local variable on
wavefront_calibrate_zernike(#176) by @sumiya-kuroda in #177 (thanks @sumiya-kuroda !) - Fixed variable name
images->phase_imageswhen theunwrapargument is used.
Additions
zernike_order_numberfor computing the number of polynomials in a Zernike pyramid, up to a givenradial_order.- Other minor documentation.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Changelog
v0.4.0 (March 2026)
Note: To better support our growing userbase, we are transitioning development and support of slmsuite to Holodyne Labs, Inc., which we founded to enable practical, real-time holography by combining high-performance algorithms and state-of-the-art spatial light modulators.
New Features
- Texas Instruments Phase Light Modulator (PLM) Support (
texasinstruments.py): new implementation with GPU-accelerated phase processing (quantization and mapping) and USB control in #172 - FLIR Camera Support (
flir.py): PySpin/Spinnaker SDK integration with QuickSpin API, auto-configuration, multi-bitdepth support (8–16 bit), WOI, GenICam nodemap traversal, and software trigger mode by @beneaze in #155, #172 - Renovated ScreenMirrored Implementation for Multi-SLM Setups (
screenmirrored.py,_pyglet.py): now with a manager thread and dedicated event thread per SLM to prevent freezes in #172 (fixes #117) - Meadowlark Enhancements: PCIe external trigger support,
execute/blockin_set_phase_hw(),_SDK_MODEenum withis_pcie, other modal support, firmware CSV update by @sumiya-kuroda in #136, #156, #159, #160 and in #142, #169 - Refined
set_phaseControl (slm.py):set_phase()now acceptsexecute(skip hardware write) andblock(non-blocking for trigger workflows) in #172 - Build Modernization: migrated from
setup.py/requirements.txttopyproject.tomlwith optional dependency groups ([gpu],[slms],[cameras],[test], etc.) in #173, #174 - Testing Infrastructure: pytest framework with CI/CD, hardware fixtures, dynamic hardware selection,
@pytest.mark.gpu/slowmarkers, and performance benchmarking in #173
Example notebooks have been updated to reflect/integrate these changes.
Breaking Changes
autofocus()signature: parameter order reversed (set_z, get_zinstead ofget_z, set_z);z_listreplaced byrange_z; newmetricandverboseparams- Build system:
setup.py,requirements.txt,requirements_ipython.txt,MANIFEST.inremoved — install viapip install slmsuite[gpu,slms]oruv sync --extra test remove_vorticesnow defaults toFalsebinaryduty_cycle corner case fixed (was inverted)
Bug Fixes
NumPy2.4 compatibility:.item()for scalar conversion, stricter indexing shapes,ptp()removal in #172, #173Pyglet>2.1.8compatibility by changing datatypes in #172- Meadowlark
get_temperature(): SDK 3.x/6.x/8.x API mismatch and missingrestypedeclaration by @sumiya-kuroda in #159 (fixes #141) - Meadowlark Remote: stale
phase→displayparameter rename by @sumiya-kuroda in #156 - Basler WOI/buffer: unimplemented WOI, centering mode conflict, missing grab retry by @sumiya-kuroda in #136 (fixes #135)
is_eveninverted logic: bitwise NOT always truthy in Python in #173binaryduty_cycle: inverted comparison and unclipped range in #173- Stale Fourier calibration warning in #173 (fixes #133)
ijcam_to_knslmin-place mutation of Fourier calibration by @philip-rk in #163
All Merged Pull Requests
- Update Basler camera functions by @sumiya-kuroda in #136
- Meadowlark coverglass function fixes for #141 in #142
- Added FLIR camera driver by @beneaze in #155
- Minor fix on Meadowlark Remote class by @sumiya-kuroda in #156
- Meadowlark
get_temperature()fix by @sumiya-kuroda in #159 - Add external trigger to Meadowlark SLM (PCIe) by @sumiya-kuroda in #160
- Fix FourierSLM calibration mutation in
ijcam_to_knslm()by @philip-rk in #163 - TI PLM support,
ScreenMirroredoverhaul,set_phaseGPU acceleration in #172 - Automated testing infrastructure in #173
- ReadTheDocs and cleanup fixes in #174
New Contributors
- @sumiya-kuroda made their first contribution in #136
- @beneaze made their first contribution in #155
- @philip-rk made their first contribution in #163
Full Changelog: v0.3.0...v0.4.0
v0.3.0
New Features
Hardware Interfaces
- Added a new interface for
Meadowlarkthat is compatible with the different types of SDKs (HDMI, PCIe, ...). Thanks to @darikoneil , @nobias , and Anna at Meadowlark. - Completed the interface for
HoloeyeSLMs. Thanks to @mkm2 . - Added a USB interface for
HamamatsuSLMs. Thanks to @ninovarde . - Polished the
Baslercamera interface. Thanks to @EiseZ , @Elenamr01 , @philip-rk , and @sumiya-kuroda . - Some polish and improvements to the
MindVisioncamera interface. - Added WOI support for the
AlliedVisioncamera interface. Thanks to @bodokaiser . - Some changes to
Webcam, including a woi interface and embedded sleeps which circumstantially seem to improve reliability. - Added remote interface where a
Servercan host cameras and SLMs which clients can connect to withRemoteCameraandRemoteSLM. For instance, we had a 20 MP camera that for whatever reason wasn't playing nicely with the computer with the GPU and SLMs, so this feature allows that camera to be hosted on a different computer. This feature was inspired in part by slmpy's server. - Made
CameraandSLMexplicitly abstract as a resolution to #92 . - Some polish to camera and SLM plots.
- Crosshair feature for live cameras. (Also centroiding thanks to @bodokaiser ).
Other Changes
- Modified
binaryto accept vectors with coordinate larger than 1, which are interpreted as instead pixel_periods for the gratings. - Added
quadrantandbahtinovalignment masks. Thanks to @bodokaiser for suggestingquadrant. - Started the process of typehinting (this will continue to the rest of the package if it looks alright) and autodocing the types.
- Fixes and upgrades to
CompressedSpotHologram, includingrefine_offset()and refactoring of the CUDA kernels. - Readded a default value for
.spot_integration_width_ijwhich is the integration size on the camera. The user should overwrite this default as needed. take_tileto tile a stack of images into a grid. Faster useful alternative to and withintake_plot.- New imaging functions
image_centroidsandimage_stdwhich are light wrappers forimage_positionsandimage_variances. - New imaging functions
image_remove_blaze,image_vortices_remove,image_reduce_wrapsto help with processing numerical phase patterns (e.g. wavefront calibration results). - Improvements and helper functions for wavefront calibration.
wavefront_calibrate_zernike_smoothprovides nearest-neighbor filtering of the multipoint Zernike results to reduce noise. This should be applied intermittently throughout a calibration as desired. Future work will provide the user with a more structured interface for multipoint Zernike wavefront calibration. - Performance improvements to Lloyd's algorithm: previously this algorithm operated by blitting a polygon onto an image and calculating the centroid numerically (inefficient). Now the centroid of the polygon is calculated analytically.
- Updated package citation and badges.
- Assorted documentation.
Bugfixes
- Fixed a bug with
Thorlabsfor 0.2.0+. Thanks to @calebrich . - Fixed a bug with
PILnot being imported in SLM vendor phase upload. Thanks to @ymelul-ibec . - Bugfix to
takewhich would erroneouslytakeevery other pixel on occasion. - Minor bugfixes with datatyping, documentation.
Pull Requests
- Update thorlabs.py by @calebrich in #98
- SLM Hamamatsu by @ichristen in #106
- Added support for Holoeye SLMs by @mkm2 in #105
- Meadowlark Interface for PCIe by @darikoneil in #90
- Camera documentation by @ichristen in #107
- Remote + Gratings. by @ichristen in #93
- Fixes a few bugs and an inconsistency in the updated meadowlark.py for 3.0.0 by @bodokaiser in #109
- Adds centroid (center of mass) crosshair widget to camera viewer by @bodokaiser in #111
- Fix canvas bug for pyglet 2.1+ by @ichristen in #116
- Adds woi support to Alliedvision camera by @bodokaiser in #110
- Fix basler serial number from list by @EiseZ in #113
- Add Image import to slm.py by @ymelul-ibec in #129
- basler2.py by @Elenamr01 in #119
New Contributors
- @calebrich made their first contribution in #98
- @mkm2 made their first contribution in #105
- @darikoneil made their first contribution in #90
- @EiseZ made their first contribution in #113
- @ymelul-ibec made their first contribution in #129
- @Elenamr01 made their first contribution in #119
Full Changelog: v0.2.1...v0.3.0
v0.2.1
Small Changes
- Tweaked array fitting to work better at small resolutions.
- Added alpha support to colormap saving.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
New Features
- Cameras update #57
ipywidgetinterface to view cameras live in jupyter notebooks, asynchronous usingasyncio. No longer will it be necessary to close a camera such that it could be opened in an external live viewer. Call.live()on any camera.- Instrumental #17 (polish/debugging) #80 ,
- Micro-Manager #21 (polish/debugging),
- Imaging Source #25 , #67
- VimbaX #66 ,
- MindVision #71 ,
- Pylablib #72 ,
- Basler #74 ,
- Webcam support using
cv2(carryover from 0.1.2). - Changed camera internals regarding exposure and image saving.
- Some extra camera documentation and error reporting.
- All hardware interfaces have a
pickle()method to send attributes to a savable dictionary. This is useful to record system state.- The
.save()method pickles and saves to .h5.
- The
Breaking Changes
- Some small changes to the
"__meta__"parameter of calibrations. - Potentially different behavior in array fitting.
Bugfixes
- pyglet >=2.0 support with <2.0 backwards compatibility #7 , tested on Windows systems.
- Small fixes.
New Contributors
- @bodokaiser made their first contribution in #81
- @kwang428 made their first contribution in #67
- @nacslab made their first contribution in d2d9927
- @lufermar made their first contribution in 092dcdf
- @coldkevin1991 made their first contribution in b373e9f
Full Changelog: v0.1.2...v0.2.0
v0.1.2
New Features
Webcaminterface usingcv2'sVideoCaptureinterface. This supports builtin or USB webcams, among other things.- Polished the
Instrumentalcamera interface. - Honed Zernike wavefront calibration functionality.
- Renamed
SLM.writetoSLM.set_phasewith backwards compatibility.
Breaking Changes
- Reverted
read_/write_paradigm in favor ofload_/save_.CameraSLM.save_calibrationCameraSLM.load_calibrationSLM.load_vendor_phase_correctionSLM.save_phaseSLM.load_phaseSantec.load_csvHologram.save_statsHologram.load_statsanalysis.files.save_image
Bugfixes
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Fixes PyPI bug which did not include cuda.cu. Minor documentation and enhancements.
Full Changelog: v0.1.0...v0.1.1
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