2024-07-10 –, Reflection (1.2)
Many multidimensional functions (e.g. a Gaussian) can be written in a (generalized) separable form.
SeparableFunctions.jl
is a package that calculates and represents separable functions efficiently.
Upon construction of a function, one-dimensional representations are pre-calculated and effienctly represented in various ways to the user.
Compared to a non-separable calculation, this yields significant speed improvements for both CPU and GPU-code alike. Radial functions are also supported.
Many multidimensional functions can be written in a (generalized) separable form. A good example of such a function is the Gaussian function. Computing such functions by first computing the separable entities and then combining them, or even keeping them in a lazy form can yield significant advantages in computation speed.
SeparableFunctions.jl
is a package, that leverages such advantages. Multidimensional functions are computed by first calculating their single-dimensional representations and then creating the final multidimensional result by an outer product (or sum or max or any other operator).
Since the broadcasting mechanism of Julia is fast compared to the evaluation of the function at each multidimensional position, the final result is calculated much faster. The typical speedup can be an order of magnitude.
The package supports three forms of representing such separable functions: collecting them, a LazyArray
representation, and a broadcasting form labelled _sep
. The latter being the most generic, however, for its application the operator needs to be supplied as follows .*(my_function_sep...)
.
In addition also radial functions (on a Cartesian grid) can be sped up, by exploiting their symmetries and possibly interpolating on a radially pre-calculated grid.
The package hosts a number of easy to use separable functions such as gaussian
, sinc
, ramp
, rr2
and some complex-valued exponentials needed for propagating optical fields or Fourier-based shifting.
Rainer Heintzmann is a professor of Physical Chemistry at the Friedrich-Schiller University Jena, and heads the microscopy research unit at the Leibniz Institute of Photonic Technology in Jena, Germany. His research focuses on methods for imaging cellular function at high resolution and developing techniques to measure multidimensional information in small biological objects such as cells, cellular organelles or other small structures of interest. He developed structured illumination, pointillism, image inversion interferometry and optical photon reassignment and is highly interested in computer-based reconstruction and inverse modelling methods such as deconvolution.