Abstract
The generalised phase contrast (GPC) method provides versatile and efficient light shaping for a range of applications. We have implemented a generalised phase contrast system that used two passes on a single spatial light modulator (SLM). Both the pupil phase distribution and the phase contrast filter were generated by the SLM. This provided extra flexibility and control over the parameters of the system including the phase step magnitude, shape, radius and position of the filter. A feedback method for the on-line optimisation of these properties was also developed. Using feedback from images of the generated light field, it was possible to dynamically adjust the phase filter parameters to provide optimum contrast.
Keywords: Phase contrast, Adaptive optics, Spatial light modulators
1. Introduction
Phase distributions can be converted into intensity distributions by means of a common path interferometer. This concept was used in Zernike's phase contrast microscope [1], which can be used to observe phase fluctuations introduced by transparent or semi-transparent specimens. A phase contrast system usually constitutes a 4f system where the zero order or DC component of the Fourier transform of the phase distribution is phase-shifted by in order to generate a synthetic reference wave (SRW). Once the beam is re-collimated, the SRW interferes with the spatially varying phase fluctuations, and an interferogram can be observed at the output plane. This is illustrated in Fig. 1, where represents a phase disturbance across the beam, and represents the observation plane.
Fig. 1.

Phase contrast system based on a 4f system. A phase distribution, , is Fourier transformed using a convex lens and a phase contrast filter (PCF) shifts the zero-order diffracted spot with respect to the rest of the diffraction pattern. After re-collimation this phase shifted spot forms a synthetic reference wave (SRW). represents the interference between the SRW and the higher spatial frequency components.
While Zernike phase contrast is useful for visualising small phase fluctuations, the case of generalised phase contrast (GPC) allows for the conversion of larger phase fluctuations to intensity distributions [2]. It is advantageous to use GPC for the generation of smooth continuous intensity distributions [3]. Even when the phase modulation element is pixelated, such as when using a liquid crystal spatial light modulator, the optical transfer function of the 4f system will provide a blurring effect, which results in a smooth intensity distribution. In addition to this, GPC provides efficient conversion of the input beam to a desired intensity distribution; efficiencies of up to 85% have been reported for binary GPC of a Gaussian beam [4], while efficiencies of 74% have been reported for the generation of greyscale intensity patterns [5]. With these properties GPC has uses in applications such as targeted photo-activation of neurons [6,7], optical trapping [8,9], and quantitative measurement of an unknown phase distribution [10]. In addition to being used for intensity shaping of monochromatic beams, GPC has also been extended to broadband beams [11].
Another common method used to generate custom intensity distributions is holographic beam shaping. This technique uses phase distributions in the entrance pupil of a lens to generate an intensity pattern at the focus of the lens [12]. The appropriate pupil phase pattern can be found using methods such as the Gerchberg–Saxton algorithm [13]. While this is a powerful technique, speckle can become a problem in the focal region of the lens. GPC can overcome this difficulty as it is based around a 4f imaging system, where the output intensity distribution is conjugate to the phase modulation applied at the entrance pupil [14].
A number of other techniques have been developed for intensity shaping of both coherent and incoherent sources. These include those that use diffractive optical elements to generate intensity distributions to generate flat-top illumination [23,25,24] or more complex illumination patterns [22]. Arrays of microlenses can also be used for intensity shaping [19,20], as is described in [26], where Köhler illumination was generated using two microlens arrays. A technique using two aspheric lenses to convert a Gaussian beam to a flat-top beam has also been described [21].
A spatial light modulator is often used to generate the initial phase distribution in the entrance pupil of the system, while the phase contrast filter (PCF) can be constructed from a machined plate of glass, where a small area in the centre is machined such that it is thinner than the surrounding glass. Alternatively, the optical path length through the central region of the filter can be increased by the addition of a layer of material. These filters are usually static, and their parameters are chosen in advance based on theoretical calculations [2,9,6].
In this work, we used two passes on a single SLM. The first pass was used to control the pupil phase distribution, while the second generated the phase contrast filter. This provided further flexibility and stability to the system; in order to change any filter parameters no mechanical changes to the system were required, only adjustments of the phase pattern on the SLM. This setup also allowed control of the alignment of the GPC system by the optimisation of a contrast metric calculated from the output intensity distribution. This metric provided a measure of the quality of the operation of GPC setup and the suitability of the PCF parameters.
2. Background
Experimental implementation of GPC is based on a spatial filtering system [15], similar to that shown in Fig. 1, where the input phase distribution is controlled by a phase modulation device such as a spatial light modulator (SLM). Such device generates the input field, , which, for a circular aperture, is represented as follows:
| (1) |
where (x,y) is the coordinate system defining positions across the beam at the entrance pupil of the system, , is the radius of the pupil, and ϕ is the phase distribution across the beam. In the case of Zernike phase contrast, the phase distribution is approximated using the first terms of a Taylor expansion, and is valid for small phase disturbances. In the case of GPC, higher order terms in the expansion are taken into consideration, which means that GPC can be used to visualise larger magnitudes of phase than Zernike phase contrast [15].
After the phase distribution has been Fourier transformed by a lens, a phase contrast filter can be introduced, which phase shifts some of the zero-order diffracted light. This filter can be described using the following equation:
| (2) |
where fx and fy are the spatial frequency coordinates in the Fourier domain and fr is the spatial frequency radius (). B is the transmittance within the diameter of the phase contrast filter, while A is the transmittance for off-axis light. θ is the magnitude of the phase step of the PCF and is the spatial frequency radius of the filter. The central region of the PCF phase shifts a portion of the zero order of the Fourier transform with respect to the higher spatial frequency components that are diffracted off-axis.
Once the beam is re-collimated by a second lens, the phase shifted portion acts as a synthetic reference wave (SRW) that can interfere with the re-collimated higher order diffracted light. In this way the system acts as a common path interferometer which is similar to the Zernike phase contrast system. The output of the GPC system consists of the interference between the SRW and the higher spatial frequency components of the incident beam and is represented by the following expression [3]:
| (3) |
where I is the intensity of the distribution at the output plane, are the spatial coordinates ( ), is the average phase across the input phase distribution, and is the radius of the aperture stop of the system. represents the synthetic reference wave; for a circular aperture and circular phase contrast filter it is defined as [3]
| (4) |
where is the spatial frequency radius of the phase contrast filter and all other quantities are as previously defined.
Eq. (3) amounts to a coherent sum between its first and second terms within the modulus brackets. A number of quantities govern the expected contrast in the intensity distribution, such as the phase step of the filter, θ, the spatial frequency radius of the filter, , the average phase across the initial phase distribution, , and the transmission coefficients of the filter, A and B.
In previous work, the filter has been machined from a piece of glass and was fixed after manufacture. As a result of this, the operation of the GPC system was constrained. The experimental system, which will be described in the next section, could control all aspects of the filter, and was therefore a suitable test-bed for experiments on the effects of varying its parameters. Control over the transmission of the filter could be attained by applying a high spatial frequency pattern to the SLM, such that reflected light would be diffracted outside the aperture of the collecting lens.
3. Experimental system
The experimental system is depicted in Fig. 2. A diode laser (Edmund Optics #85-230 4.5 mW CW, λ=780 nm) was first spatially filtered and expanded using lenses L1 and L2 and the spatial filter (SF). An iris defined the size of the beam incident on the first pass of the SLM and was set to approximately 4 mm in diameter. This was imaged onto the SLM using lenses L3 and L4. The SLM was manufactured by Boulder Nonlinear Systems (model no. P512-785), and was capable of a full wave of modulation at 785 nm. It consisted of a 512×512 array of pixels of size 15 μm. Turning mirrors were used to direct the beam reflected off the SLM through lens L5, which focused the beam onto an adjacent portion of the SLM. The focal length of this lens was set at 500 mm in order to keep the angles of incidence and reflection onto the SLM less than 5°. The output intensity distribution was viewed on an 8-bit CMOS camera (Thorlabs DCC1545M). In this configuration, both a pupil plane and a focal plane could be simultaneously controlled using adjacent parts of the SLM.
Fig. 2.
Schematic of the GPC system using two passes on a single SLM. The first SLM pass introduced a phase distribution across the beam while the second applied a phase shift to the centre of the Fourier transform of the input phase distribution. Ls is a diode laser, L1–L6 are lenses, M1–M6 are plane mirrors, SF is a spatial filter, HWP is a half wave plate, Pol is a polariser, SLM is a liquid crystal spatial light modulator (P512-0785 manufactured by Boulder Nonlinear Systems), and a CMOS camera was used as detector. The inset figure shows the design of the two-passes on the SLM in more detail.
LABView software was written to control all aspects of the system controlled by the SLM, such as the input phase distribution and the filter parameters; the position of the filter could also be changed using this software. Three example output images from the system are shown in Fig. 3. These were obtained using input binary phase patterns. The intensity patterns produced were a circle, an annulus and a pattern of lines of spatial duty cycle 25%. These were binary patterns that were phase shifted by π with respect to the background. The images in Fig. 3 showed that the dual-pass SLM-based system was operating as a conventional GPC system.
Fig. 3.

Example output images from the GPC system. Intensity distributions of a circle, annular aperture and a set of lines with 25% duty cycle were generated. The weak diagonal fringes visible across the images were due to the interference of a back reflection off a polariser in the optical system.
As the system provided flexibility in the control of both the input phase distribution and the phase contrast filter, this permitted the implementation of a feedback scheme to optimise the parameters of the PCF. An image-based adaptive optics approach was used, whereby a quality metric derived from the contrast of an image of the output intensity was maximised. This approach has been used extensively for the correction of aberrations in microscopes and other optical systems [16].
4. Filter optimisation
Using the SLM to generate the phase contrast filter provided flexibility and programmability in controlling the filter's parameters. Parameters such as the magnitude of the phase step, diameter, shape and position of the filter could be controlled. This provided an advantage in the adaptive alignment and optimisation of the filter parameters for different experimental requirements.
We illustrate this capacity using a metric, which was chosen to assess the quality of binary-intensity GPC output patterns obtained from the system. First, a mask was generated from the desired intensity pattern, dividing the pixels into those inside and outside the mask, corresponding the bright and dark areas in the desired intensity patterns. The metric, μcontrast, was defined as the difference between the sum of the pixel values inside and outside the mask, denoted by ηinside and ηinside respectively; the bright areas were inside the mask, while the dark areas were outside
| (5) |
4.1. Filter diameter and phase step optimisation
The first two filter parameters to be optimised were the magnitude of the phase step and the radius of the filter. As each of the filter parameters were independent of each other, they could be optimised in turn. Two test phase distributions were used in the entrance pupil of the system, and applied using the first pass of the SLM. These were the circle and the set of lines shown in Fig. 3.
In optimising the radius and phase step of the filter, the system was first coarsely aligned by adjusting the position and radius of the filter with a phase step of π, which was an estimate of the optimal phase step. A routine was written in LabVIEW to vary the radius or phase step in turn, and then to record an image. The contrast metric was calculated for each value of the radius or phase step.
4.2. Filter diameter
Using the circular phase pattern, the optimal diameter for the filter was found to be 9 pixels, which was equivalent to 135 μm as the pixel size of the SLM was 15 μm. This metric curve, depicted in Fig. 4(a) showed a clear peak indicating the optimal filter diameter for this pattern. Plotting a similar curve for the second input phase distribution gave a different value for the optimal filter diameter. The optimal filter diameter for the line pattern was 10 pixels, equivalent to 150 μm. The metric curve for this measurement is shown in Fig. 4(b). Example images from this experiment are also shown in Fig. 5. This figure shows the GPC image obtained using the circle pattern for different diameters of phase contrast filter. These qualitatively show a variation in the contrast of the output when the diameter of the PCF is changed.
Fig. 4.
The calculation of the contrast metric was used to optimise the diameter of the phase contrast filter, which was controlled using second pass on the SLM. Metric curves were obtained for two intensity patterns, a circle (a), and a set of lines of duty cycle 25% (b).
Fig. 5.
GPC images of a circle shown for different diameters of phase contrast filters, increasing from left to right. The PCF for the left image has no PCF present; there is little difference in intensity between pixels inside and outside the circle. The PCF for the central image has a more optimal diameter of 8 SLM pixels (pixel size=15 μm), while the PCF for the right image is larger than optimal at 16 pixels.
Additionally, the contrast observed in the line pattern did not depend greatly on the filter diameter as long as the diameter was greater than ten pixels. This is different to the trend observed using the circle pattern, and can be explained if we consider the line pattern and its corresponding Fourier transform. The Fourier plane in this case will consist of the zero order in the region of the geometric focus, as well as a line of discretely space points representing the regular spatial frequency content of the pattern. The orientation of these points depends on the orientation of the line pattern in the input phase distribution. Little light will be present between these discrete points and, therefore, modifying the filter diameter up to the diameter corresponding to the first-order diffracted spots should have little effect on the measured contrast. The dependence of the optimum PCF diameter upon the desired output intensity illustrates the benefit of the adaptable GPC configuration.
4.3. Phase step
The results for the optimisation of the phase step and the radius are shown in Fig. 6. The contrast metric was calculated for a set of input values of θ, varying in steps of 0.05 over one full wavelength. The SLM had previously been calibrated and linearised between crossed polarisers, such that the value of θ was known from the voltage applied.
Fig. 6.
The calculation of the contrast metric was used to optimise the magnitude of the phase step, θ in Eq. (2), of the phase contrast filter, which was controlled using the second pass on the SLM. Metric curves were obtained for two intensity patterns, a circle (a), and a set of lines of duty cycle 25% (b).
The two desired output patterns were again used to illustrate the optimisation process, the circle and line patterns shown previously in Fig. 3. As shown in Fig. 6(a), the optimum phase step for the circular intensity distribution was found to be 0.525 waves, while for the line pattern, the optimal value of θ was 0.590 waves. The difference between these two values of phase step can be attributed to the term in Eq. (3). This term is related to the average value of the input phase distribution and directly affected the contrast in the interference described in Eq. (3). As the circle and line patterns have different average phases, it follows that their respective optimal values of θ would also be different. This has previously been discussed in [17], where the magnitude of the phase step could be matched to using a graphical phase chart and ternary phase distribution. can also be modulated in the pupil plane by including high spatial frequency patterns in the input image [18]. This diffracts some of the light off-axis so that it is not collected by the constituent lenses of the GPC system, and does not contribute to the final image.
4.4. Position optimisation
The position of the filter was optimised by scanning the filter across a range of pixel positions and measuring the resulting contrast metric. First, the filter was coarsely positioned by eye; its position was then scanned over an 10×10 grid of SLM pixels centred on this coarse position. An image was recorded at each position and the contrast metric described in Eq. (5) was calculated. The resulting calculations of the metric are shown in Fig. 7.
Fig. 7.
The calculation of the contrast metric was used to optimise the position of the phase contrast filter, which was implemented via a second pass on the SLM. The metric was measured over a 10×10 grid of positions on the SLM. This 2D plot (a) represents the contrast metric calculated for each of these positions, with the maximum at indicating the optimal position of the PCF on the SLM. Example images (b) from the GPC system showing the effect of mis-alignments of the phase contrast filter. The central image was recorded when the filter was at its optimal position. When the filter was moved away from this position, gradients related to the displacement of the filter were visible in the recorded images.
The optimal position was found to be as shown in the two-dimensional plot in Fig. 7(a). This was different to the initial manual position, approximately one pixel away in the vertical direction on the SLM. This corresponded to an difference in positioning of the filter of 15 μm, which is the size of one pixel on the SLM.
Fig. 7(b) shows the effect of mis-positioning of the phase contrast filter on the intensity distribution. In this figure, it can be seen that when the PCF was displaced from its optimal position, a gradient in the intensity distribution was observed. The orientation of this gradient was related to the direction of displacement of the filter. This property could also be used to develop a metric for the optimisation of the GPC system for both initial alignment and monitoring of the alignment of the system throughout an experiment. This effect is related to Eq. (3), which expressed the coherent sum of the SRW and the phase distribution. When the filter is positioned non-optimally, a misalignment between the SRW and the phase distribution occurs, which results in the observed gradient.
5. Conclusion
In this paper we have presented a dynamic generalised phase contrast system using two passes on a single SLM. The first pass was used to control the phase distribution across the beam, while the second pass coincided with the Fourier plane of this phase distribution and provided flexible control over the phase contrast filter. The controllable parameters of the filter included diameter, phase step size, and position. Although not shown here, the configuration also permitted modification of further PCF parameters including shape and coefficient of transmission. The latter could be controlled by applying a phase pattern of high spatial frequency in the filter plane.
Previous GPC systems had used fixed phase contrast filters, which placed constraints on the inputs and outputs of the system. The dynamic GPC system provided considerably more flexibility than a corresponding fixed phase contrast filter, as the parameters listed above could be controlled through software without physically adjusting any component of the system. With this, it was possible to develop a routine enabling adaptive alignment and optimisation of the phase contrast filter. An image contrast metric was introduced that measured the efficacy of the GPC system for any binary output image and provided a feedback criterion for the optimisation of the system configuration.
The contrast metric could be used to optimise the position of the phase contrast filter, thus removing any errors due to imprecise manual positioning. Results also suggested that the displacement of the filter from its optimal position had a predictable influence on the intensity distribution from the system. A gradient was observed in the images which depended on the distance and direction of the displacement of the filter. We note that the results presented in this paper were obtained using binary phase distributions. In the case of greyscale GPC, an adjustment would be made to the metric used, where a weighting would be applied to discrete areas of the GPC output. The weighting would depend on the expected GPC output.
Optimisation of the diameter of the filter gave different results depending on the input field. The metric curve for the circle had a clear maximum, while for the lines, once a threshold filter diameter had been reached there was little dependence on the size of the filter. In optimising the phase step of the filter, different optimal values were again obtained for the circle and the lines distributions. Dynamic control over the optimisation of the PCF provided the capacity to easily switch between these intensity distributions. This could be achieved using software to change the pattern applied to the SLM and is an advantage over GPC systems that use a static filter.
Acknowledgement
This research was supported by a grant from the Biotechnology and Biological Sciences Research Council (BBSRC), United Kingdom, through Grant no. BB/J020907/1.
References
- 1.Zernike F. How I discovered phase contrast. Science. 1955;121:345–349. doi: 10.1126/science.121.3141.345. (1955) [DOI] [PubMed] [Google Scholar]
- 2.Glückstad J. Phase contrast image synthesis. Opt. Commun. 1996;130:225–230. [Google Scholar]
- 3.Glückstad J., Palima D. Springer; Netherlands: 2009. Generalized Phase Contrast. [Google Scholar]
- 4.Glückstad J., Lading L., Toyoda H., Hara T. Lossless light projection. Opt. Lett. 1997;22:1373–1375. doi: 10.1364/ol.22.001373. [DOI] [PubMed] [Google Scholar]
- 5.Glückstad J., Palima D., Rodrigo P.J., Alonzo C.A. Laser projection using generalized phase contrast. Opt. Lett. 2007;32:3281–3283. doi: 10.1364/ol.32.003281. [DOI] [PubMed] [Google Scholar]
- 6.Papagiakoumou E., Anselmi F., Bègue A., de Sars V., Glückstad J., Isacoff E.Y., Emiliani V. Scanless two-photon excitation of channelrhodopsin-2. Nat. Methods. 2010;7:848–854. doi: 10.1038/nmeth.1505. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Bañas A., Palima D., Villangca M., Aabo T., Glückstad J. GPC light shaper for speckle-free one- and two-photon contiguous pattern excitation. Opt. Express. 2014;22:5299–5311. doi: 10.1364/OE.22.005299. [DOI] [PubMed] [Google Scholar]
- 8.Eriksen R., Daria V., Glückstad J. Fully dynamic multiple-beam optical tweezers. Opt. Express. 2002;10:597–602. doi: 10.1364/oe.10.000597. [DOI] [PubMed] [Google Scholar]
- 9.Eriksen R.L., Mogensen P.C., Glückstad J. Multiple-beam optical tweezers generated by the generalized phase-contrast method. Opt. Lett. 2002;27:267–269. doi: 10.1364/ol.27.000267. [DOI] [PubMed] [Google Scholar]
- 10.Rodrigo P., Palima D., Glückstad J. Accurate quantitative phase imaging using generalized phase contrast. Opt. Express. 2008;16:2740–2751. doi: 10.1364/oe.16.002740. [DOI] [PubMed] [Google Scholar]
- 11.Palima D., Glückstad J. Multi-wavelength spatial light shaping using generalized phase contrast. Opt. Express. 2008;16:1331–1342. doi: 10.1364/oe.16.001331. [DOI] [PubMed] [Google Scholar]
- 12.Curtis J.E., Koss B.A., Grier D.G. Dynamic holographic optical tweezers. Opt. Commun. 2002;207:169–175. [Google Scholar]
- 13.Gerchberg R.W., Saxton W.O. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik. 1972;35:237–246. [Google Scholar]
- 14.Palima D., Daria V.R. Effect of spurious diffraction orders in arbitrary multifoci patterns produced via phase-only holograms. Appl. Opt. 2006;45:6689–6693. doi: 10.1364/ao.45.006689. [DOI] [PubMed] [Google Scholar]
- 15.Glückstad J., Mogensen P.C. Optimal phase contrast in common-path interferometry. Appl. Opt. 2001;40:268–282. doi: 10.1364/ao.40.000268. [DOI] [PubMed] [Google Scholar]
- 16.Booth M.J. Adaptive optical microscopy: the ongoing quest for a perfect image. Light: Sci. Appl. 2014;3:e165. [Google Scholar]
- 17.Glückstad J., Mogensen P.C. Reconfigurable ternary-phase array illuminator based on the generalised phase contrast method. Opt. Commun. 2000;173:169–173. [Google Scholar]
- 18.Palima D., Glückstad J. Diffractive generalized phase contrast for adaptive phase imaging and optical security. Opt. Express. 2012;20:1370–1377. doi: 10.1364/OE.20.001370. [DOI] [PubMed] [Google Scholar]
- 19.Sales T.R.M. Structured microlens arrays for beam shaping. Proc. SPIE. 2003;5175:109–120. [Google Scholar]
- 20.Kopp C., Ravel L., Meyrueis P. Efficient beamshaper homogenizer design combining diffractive optical elements, microlens array and random phase plate. J. Opt. A, Pure Appl. Opt. 1999;1(3):398–403. [Google Scholar]
- 21.Hoffnagle J.A., Jefferson C.M. Design and performance of a refractive optical system that converts a Gaussian to a flattop beam. Appl. Opt. 2000;39(30):5488–5499. doi: 10.1364/ao.39.005488. [DOI] [PubMed] [Google Scholar]
- 22.Case S.K., Haugen P.R., Løkberg O.J. Multifacet holographic optical elements for wave front transformations. Appl. Opt. 1981;20(15):2670–2675. doi: 10.1364/AO.20.002670. [DOI] [PubMed] [Google Scholar]
- 23.Gur I., Mendlovic D. Diffraction limited domain flat-top generator. Opt. Commun. 1998;145(1–6):237–248. [Google Scholar]
- 24.Veldkamp W.B. Laser beam profile shaping with interlaced binary diffraction gratings. Appl. Opt. 1982;21(17):3209–3212. doi: 10.1364/AO.21.003209. [DOI] [PubMed] [Google Scholar]
- 25.Yang J.J., Wang M.R. Analysis and optimization on single-zone binary flat-top beam shaper. Opt. Eng. 2003;42(11):3106. [Google Scholar]
- 26.R. Voelkel, K.J. Weible, Laser beam homogenizing: limitations and constraints, Proc. SPIE, Optical Fabrication, Testing, and Metrology III 7102 (2008) 71020J.





