- Added the function
mathutils.zernike.zernike, which returns the radial part of Zernike polynomials of degreenand azimuthal frequencym, evaluated at the locationsr. To get the full Zernike polynomial, multiply bycos(m * theta)and/orsin(m * theta). - Added a near-field-to-far-field transform, based on the surface equivalence theorem (see for example Computational Electrodynamics: The Finite-Difference Time-Domain Method, Taflove and Hagness, 2nd ed., Ch. 8.4). Implementation at
farfield_transform.equivalence.near_field_to_far_field.
- Fixed an exception being thrown by
disk.get_integration_locationswhenObjective.minimal_integration_orderwas used and the error in z was leading.
- Added integration schemes to
mathutils.integrationfor integrating over a disk or annulus. The schemes"peirce"and"lether"are based on a Gauss-Legendre-style integration scheme, whereas the scheme"takaki"uses optimal placement of integration locations.- William H. Peirce, "Numerical Integration Over the Planar Annulus,", Journal of the Society for Industrial and Applied Mathematics, Vol. 5, No. 2 (Jun., 1957), pp. 66-73
- Frank G. Lether, "A Generalized Product Rule For The Circle," SIAM Journal on Numerical Analysis, Volume 8, Issue 2, Pages 249 - 253
- Nick Takaki, G. W. Forbes, and Jannick P. Rolland, "Schemes for cubature over the unit disk found via numerical optimization,", Journal of Computational and Applied Mathematics
- Added the ability to use new cylindrical integration schemes with the
trappingmodule. - Added Gauss-Legendre and Clenshaw-Curtis spherical integration methods for force calculations (in case orders higher than those supported by Lebedev-Laikov are required)
- Jörg Waldvogel, "Fast Construction of the Fejér and Clenshaw–Curtis Quadrature Rules," BIT Numer. Math. 46, 195–202 (2006)
- Kendall Atkinson, "Numerical integration on the sphere," The Journal of the Australian Mathematical Society Series B Applied Mathematics. 1982;23(3):332-347
- Added a method to automatically determine the minimal integration order to
objective.Objective- Supported methods are
"peirce"(new) and"equidistant"(only option until v0.7.0)
- Supported methods are
- Changed the default spherical integration order to twice the number of Mie modes for the Lebedev-Laikov integration scheme when no integration order is given. That is,
spherical_integration_order = Bead.number_of_modes * 2 - Added the electromagnetic field distribution for magnetic dipoles at arbitrary orientations.
- Added
psf.cztandpsf.quad, two modules that contain functions to calculate the Point Spread Function (PSF) of arbitrary fields on the back focal plane of an objective. They use a new callback signature and and re-use what is already calculated by theObjectiveclass. The names of the modules make the method of calculation more explicit, namely either the Chirped-Z Tranform (CZT) is used, or a 2D quadrature method is used. Thepsf.quadmodule supports a new integration method called "peirce" that is dedicated to integration over a circular domain, such as the back focal plane. It typically converges faster than the equidistant ("czt") methods, but the actual CZT implementations could still beat quadrature on raw speed. - Added Pytest for CZT-based far-field transform
- Bumped minimum version of Python to 3.10
- Bumped maximum tested version of Python to 3.13
- Removed Lebedev-Laikov code in favor of Scipy's
lebedev_rulefunction. - Removed chirped z-transform code in favor of Scipy's
CZTclass. - Updated the signature of the callback used to calculate the field on the back focal plane (see examples for new type).
- Made the distinction between the number of spherical modes, the order of integration over the back focal plane and the order of integration over the sphere more explicit by renaming the parameters of the functions in the
trappingmodule. - Added the propery
Bead.number_of_modes
- Deprecated the modules
psf.fastandpsf.direct, and the functionspsf.fast_psfandpsf.fast_gauss. The new functions (see above) are nearly the same as the deprecated versions, but take anObjectiveclass instance instead of four parameters forn_bfp,n_medium,NAandfocal_length, and use the new callback signature. - Deprecated the property
Bead.number_of_ordersin favor ofBead.number_of_modes, to help distinguishing between integration order and spherical modes.
- Speed up trapping calculations by making loops multi-threaded
- Update Trapping forces example with closures
- Bumped minimum version of Python to 3.9, to easily accomodate typing
- Bumped maximum tested version of Python to 3.12
- Added closures to prevent recalculating fixed, but computationally intense, data for force calculations. See
trapping.force_factory. - Speed up trapping calculations by rewriting code such that it can be compiled by Numba
- Added functionality to shift the coordinate system for
fast_psf() - Added Pytest tests for example notebooks
- Added Pytest test for czt equivalence between FFT and czt for specific cases
- Fixed broken czt transform for array inputs
- Fixed bug where the electric field was not correct as a function of z in
psf.reference.focused_dipole_ref - Fixed bug where the Z grid points were not returned even with
return_gridbeing True inpsf.reference.focused_dipole_ref
- Initial release