In this paper we suggest utilizing this high sensitivity of LG modes to determine the phase errors just from the distorted shape of a focussed doughnut mode. The basic idea is that we use a phase retrieval algorithm to find the hologram that would produce the observed distorted doughnut if displayed on a perfectly flat SLM and imaged with “perfect” optics. Consequently, the acquired hologram will include the information about imperfections like the surface deviation of our “real” SLM or phase errors of the additional imaging optics. Once the phase errors are known, a corrective phase pattern can be calculated, which can be superposed to each subsequently produced phase pattern to compensate for any phase errors of the SLM or the optical pathway.
Although such a phase retrieval is normally not unique, i.e., there are a lot of SLM phase patterns that would produce the observed intensity distribution at the CCD, there is a high probability of finding the correct aberration pattern, since the algorithm starts with the well-known phase distribution that would generate a “perfect” doughnut mode, assuming that the correct solution lies close enough to this starting pattern for the algorithm to converge.
Fig. 1. Sketch of the experimental setup. The off-axis vortex lens (superposed by a blazed grating) shown in the picture should create a focussed doughnut mode on the CCD. Due to surface deviations of the SLM, however the doughnut appears distorted. A single image of the distorted doughnut enables an iterative “phase retrieval” algorithm to find the corresponding phase function in the SLM plane.
sketches the experimental setup. The reflective SLM shows a diffractive vortex lens, which transforms a collimated laser beam into an optical vortex of helical charge L
= 1 and focusses it on a CCD. The vortex lens is superposed by a blazed grating in order to spatially separate the optical vortex generated in the first diffraction order from other orders. According to surface aberrations of the light modulator, the doughnut appears distorted. A CCD image of this doughnut is taken as input for the Gerchberg-Saxton (GS) algorithm [4
4. R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of phase from image and diffraction plane pictures,” Optik 35, 237246 (1972).
] – an iterative phase retrieval algorithm – which is able to find the corresponding phase hologram that would produce the observed intensity pattern, if it were displayed on a non-distorted SLM. The acquired hologram will then consist of an ideal phase vortex pattern overlaid by the phase errors that are retrieved with this method.
Although in principle this procedure does not require LG modes and could also be per-formed on the basis of other light field patterns, we found that using doughnuts delivers much better results in simulations and experiments than for instance using an image of the point spread function. The main advantage of this method, besides its simplicity, is the fact that it corrects not only the surface curvature of the SLM, but also other phase errors that are introduced by the other optical components in the optical pathway. The resulting correction hologram will therefore also compensate phase errors introduced by these additional parts (however, it is clear that not every error can be completely compensated by a phase-only modulator).
Phase retrieval techniques like the GS algorithm deal with the problem of finding the phase H(x,y) of a light field by just knowing the modulus A(kx,ky) of its Fourier transform:
In our special case, H
) corresponds to the hologram function, and A
) to the amplitude of the observed doughnut mode. The problem is of relevance in many fields of research, for instance electron microscopy or astronomy, which led to the development of various techniques to solve this problem [5
5. J. R. Fienup, “Phase retrieval algorithms: a comparison,” Appl. Opt. 21, 2758–2769 (1982). [CrossRef] [PubMed]
6. A. Muller and A. Buffington, “Real-time correction of atmospherically degraded telescope images through image sharpening,” J. Opt. Soc. Am. 64, 1200–1210 (1974). [CrossRef]
Unfortunately, there may exist many phase patterns whose Fourier transform show a similar amplitude function, just slightly deviating from A
). The deviation can be quantified by the root-mean-square deviation as an error function ε
. Since ε
depends on the phase value of every single pixel of H
), it can be understood as a scalar field in a M
dimensional space where each pixel of the phase pattern H
) corresponds to an independent axis. Phase functions which produce amplitude fields similar to A
) can correspond to local minima of ε
in this multidimensional space. The GS algorithm, as well as so-called “steepest-descent” methods like for instance the direct binary search [7
7. M. A. Seldowitz, J. P. Allebach, and D. W. Sweeney, “Synthesis of digital holograms by direct binary search,” Appl. Opt. 26, 2788–2798 (1987). [CrossRef] [PubMed]
] will in every iterative step reduce the error function ε
, until it reaches a minimum. Which minimum is finally reached, depends solely on the initial hologram phase, which corresponds to an initial starting position in the space of ε
. To handle this problem, one can define detailed boundary conditions [8
8. J. R. Fienup, “Phase retrieval using boundary conditions,” J. Opt. Soc. Am. A 3, 284–288 (1985). [CrossRef]
] in order to find the “true” solution, i.e., the global minimum of ε
The method presented here uses just the “standard” boundary conditions for the GS algorithm, i.e., the amplitude fields in the SLM plane and the image plane. It turns out that (for small phase errors) choosing the ideal phase vortex as initial hologram phase is – together with these boundary conditions – sufficient to find the correct hologram function. In a more descriptive view, this corresponds to the choice of an initial position in the ε-space, which lies close enough to the global minimum of ε for the algorithm to find it.
2. Phase retrieval procedure
sketches the operation of the GS algorithm. The initial complex field is a phase vortex arg(x
+ i y
) with a finite circular aperture in the SLM plane, where arg denotes the complex phase angle (in a range between 0 and 2π
) of a complex number. The aperture is necessary, since we want the algorithm to find a phase hologram which produces a doughnut mode of the size we observe
. Because the size of the experimentally produced focussed doughnut depends on the numerical aperture of the imaging pathway, a correspondingly matched numerical aperture has to be introduced in the numerical algorithm by limiting the theoretically assumed illumination aperture by a circular mask. Additional information about why such an aperture has to be used and how the right aperture size can be determined will follow later.
The first step of the algorithm is an FFT of the initial complex field in order to determine the corresponding field distribution in the image plane. Then the amplitude Â(kx,ky) is replaced by the square root of the doughnut intensity image, followed by an inverse Fourier transform. In the SLM plane, the amplitude a(x,y) is replaced by a constant value (including the aperture), which corresponds to a homogenous illumination of the SLM hologram in the experiment. The cycle is performed until ε converges (i.e., until it decreases less than a certain percentage per iterative step, which is 1% in our case). The resulting pattern H(x,y) corresponds to a pure phase hologram, that would produce the observed distorted doughnut pattern. In order to find the corresponding wavefront distortion C(x,y) introduced by the non-optimal surface of the SLM and the remaining optical components, the phase wavefront of an ideal doughnut mode has to be subtracted from H(x,y), i.e., C(x,y) = H(x,y) - arg(x + i y). Finally, in order to program the SLM such that it compensates these distortions, C(x,y) has to be subtracted from every hologram function, that is displayed on the SLM.
Fig. 2. GS algorithm for finding phase errors. The starting pattern consists of a uniform intensity distribution, limited by a circular aperture that defines the numerical aperture of the imaging system, and a phase vortex (gray scales correspond to phase values). After a few iterative cycles, the error function ε converges. H(x,y) then corresponds to a phase pattern that would produce the actually observed distorted doughnut image, if displayed on a perfect SLM. It represents a perfect vortex superposed by phase errors. By subtracting the starting pattern, the phase errors are extracted.
gives an overview of the experimental results, gained with the setup of Fig. 1
. The reflective SLM (LC-R 720
, with a resolution of 1280×768 pixels at a pixel size of 20 μm) is illuminated by the beam of a helium-neon laser, which was expanded to a diameter much larger than the displayed phase hologram, which has a diameter of MHolo
=512 pixels. Thus the light intensity is approximately constant over the whole diffraction pattern. The linear polarization state of the laser is rotated to maximize the diffraction efficiency. The SLM then shows efficient phase modulation (and a small residual polarization modulation).
The diffractive phase pattern to be displayed has the form
which corresponds to a phase spiral of topological charge L, superposed by a grating of periodicity 2π/k, and a lens with focal length f. λ represents the wavelength of the used light. If f is chosen to match the distance between SLM and CCD, the modulus of the light field on the CCD is that of the Fourier transform of the hologram on the SLM:
with D(x,y) denoting the phase distortion function of the SLM.
The two (inverted) intensity images of the first column in Fig. 4
show the CCD snapshots of a doughnut mode and a focal spot, which are produced by the hologram function of Eq. 2
for the cases L
=1 and L
=0, respectively. The doughnut mode seems to be much more distorted than the focussed spot corresponding to the point spread function of the setup.
After some preliminary image processing steps, this doughnut snapshot acts as input information for the GS algorithm. The first step is precise centering of the mode, which makes it simpler for the algorithm to reconstruct the mode, because linear phase shifts corresponding to trivial displacements are removed. This is followed by tight clipping of the mode and subsequent padding with zeroes to a quadratic data array of reasonable size MArray
, e.g. MArray
= 1024 pixels. This step gets rid of the noise outside the relevant part of the image, greatly improving the performance of the approach. It is necessary to “mask” the simulation hologram with a circular aperture, as sketched in Fig. 2
, in order to ensure that the computer-simulated light field has exactly the same size (in pixels) as the real image on the CCD. The masking thus represents a correction for the different size scaling factors of the software (numerical FFT) and hardware (optical lens) Fourier transform. The optical FT incorporates length scaling factors which the FFT disregards, like wavelength, focal lengths, and the pixel size ratio between SLM and CCD. Because of the aperture masking, the correction pattern (which has the size of the aperture) will always be smaller than MArray
. Consequently it is reasonable to choose MArray
larger than the hologram size in the first place.
Experimental results, achieved with the setup of Fig. 1
: the small images in (A) show doughnut modes prior (first column) and after (second and third column) correction patterns have been added to the hologram function. The corresponding experimentally measured point spread functions are plotted below. In this experiment, the GS algorithm was applied two times: after it converged for the first time, the resulting correction pattern was displayed on the SLM. Then, a second run of the algorithm was performed on the base of the now less distorted doughnut image (second column). Finally, displaying the sum of both correction functions led to a further improved doughnut quality (third column). In the next step an additional distortion in the optical path was introduced by inserting a tilted glass plate in the beam path (see Fig. 1
). Also this distortion could be compensated by an additional run of the optimization algorithm (fifth column). The two images in the darker box on the right show the ideal intensity distributions as they were produced by a perfectly flat SLM. The colored patterns in (B) represent the corresponding correction functions.
The choice of the right diameter of the aperture is crucial. Experimentally, it can easily be determined by subsequently displaying two gratings on the SLM, the grating vectors of which differ by ∆k (in inverse pixels), and measuring the corresponding spatial shift of the laser spot on the CCD. The desired aperture diameter A (in pixel units) is then determined by
where ∆ℓ is the focus-shift on the CCD in pixel units, MArray
the side length of the data array, and MHolo
the diameter of the hologram on the SLM, both measured in pixels. Eq. 4
loses its validity if additional apertures narrow the beam diameter. According to Eq. 4
, the aperture diameter (and hence the size of the correction pattern) depends linearly on MArray
. Consequently the resolution of the correction pattern increases with the size of MArray
, however, at the cost of higher computational effort. If MArray
is chosen to be 2π
, the correction pattern will have the resolution of the SLM hologram. However, for our experiments, this value is in the range of 5000 pixels, i.e. too large for reasonably fast computation. Thus we choose MArray
= 1024 pixels, and “re-sample” the achieved correction pattern to the size of MHolo
Fig. 5. Optimization of a simple imaging path. (A) Sketch of the setup. Just the first diffraction order is shown. Lens 2 images the resolution target on the CCD, when the SLM is used as a mirror. (B) Images of the resolution target and a doughnut mode, before (upper image) and after (lower image) SLM correction.
The image in the second column of Fig. 4
shows a doughnut mode which was created by the corrected hologram. In some experiments it was possible to improve the result by performing a second run of the algorithm, where the correction pattern acquired by the first cycle was displayed at the SLM and the resulting image served as starting image. This is also the case in the example of Fig. 4
. The final correction function is calculated as the sum of the output functions of both cycles (left colored image in (B)). Similar to the simulations, a small discontinuity emerged near the center of the phase function. The two images in the third column of Fig. 4(A)
represent a doughnut and the point spread function, produced by adding the correction pattern to the hologram function of Eq. 2
. Both images are very close to their ideal shapes, which are shown in the darker shaded box on the right.
In a next step, a tilted glass plate (microscope slide) was placed into the converging beam path in order to introduce astigmatism. This again significantly distorted the doughnut mode (fourth column). However, the doughnut shape could be restored perfectly by adding a second corrective phase pattern (colored image on the right), which was achieved by another run of the GS algorithm.
The second experiment (Fig. 5
) demonstrates the optimization of a simple imaging system, where the SLM is directly integrated into the optical pathway. If the SLM displays just a grating, lens 2 places a magnified image of the test object on the CCD. The grating constant is chosen in a way that the first diffraction order enters the CCD (for simplicity other orders were neglected in the sketch).
Before the correction, the upper right image of the test object (cypher 4) appears blurred, which mainly originates from the SLM distortion. In order to create a doughnut test image to “feed” into the GS algorithm, a diffractive vortex lens is superposed on the SLM grating which focusses a doughnut beam directly on the imaging chip (upper image in the small box).
After the achieved correction function was superposed on the grating on the SLM, the imaging quality showed significant enhancement. The image of the test object shows much less blurring than before the correction. In contrast to the first experiment of Fig. 4
, a second run of the algorithm did not lead to further improvement.
We present a fast and accurate method for the surface correction of spatial light modulators. The method uses one single image of a focussed doughnut beam, created by the SLM, to find the corresponding phase hologram with the Gerchberg Saxton algorithm. A doughnut beam of helical charge L=1 has proven to be much more suitable for this technique than LG modes of significantly higher order, and also more suitable than trying to optimize the point spread function directly. A possible reason for this may lie in the fact that the point spread function has too small an extension to be clearly resolved by the CCD, and intensity deviations due to phase errors have little impact on the scale of the very intense center of the spot. On the other hand, LG modes of higher order show violation of the Nyquist criteria in a larger zone around the hologram center. Generally, it seems plausible that the L=1 doughnut mode hologram is an “optimal” test pattern for obtaining a phase correction function, since it generates an extended doughnut image with an isotropic structure that is created purely by interference and depends critically on the perfect phase relation between all field components in its Fourier plane, i.e., the SLM plane.
The presented method promises applicability in research areas where the light phase has to be modified by flexible devices like SLMs or micro mirror arrays with high accuracy, as it is the case in interferometry, laser mode shaping, STED microscopy [10
10. S. W. Hell and J. Wichmann, “Breaking the diffraction resolution limit by stimulated emission: stimulated-emission-depletion fluorescence microscopy,” Opt. Lett. 19, 780–782 (1994). [CrossRef] [PubMed]
] or optical trapping. The method could also be used to optimize the entire optical setup, since the determined correction function also corrects distortions which are introduced by other optical elements.