GPC light shaper for speckle-free one-and two-photon contiguous pattern excitation

: Generalized Phase Contrast (GPC) is an efficient method for generating speckle-free contiguous optical distributions useful in diverse applications such as static beam shaping, optical manipulation and recently, for excitation in two-photon optogenetics. To fully utilize typical Gaussian lasers in such applications, we analytically derive conditions for photon efficient light shaping with GPC. When combined with the conditions for optimal contrast developed in previous works, our analysis further simplifies GPC’s implementation. The results of our analysis are applied to practical illumination shapes, such as a circle and different rectangles commonly used in industrial or commercial applications. We also show simple and efficient beam shaping of arbitrary shapes geared towards biophotonics research and other contemporary applications. Optimized GPC configurations consistently give ~84% efficiency and ~3x intensity gain. Assessment of the energy savings when comparing to conventional amplitude masking show that ~93% of typical energy losses are saved with optimized GPC configurations.


Introduction
The ability to shape light for both fixed and programmable shapes has many applications in both research and industry.With the widespread use of lasers that lend themselves to efficient reshaping, light's versatility is further increased.Hence, laser beam shaping based on photon efficient phase-only methods are extensively applied in research such as advanced microscopy, optical trapping and manipulation [1], and more recently, neurophotonics twophoton optogenetics [2] which applies optical tools to neuroscience.Outside the laboratory, efficient light shaping is also desirable for applications such laser machining, photolithography and video displays to name a few.These diverse applications would have different ideal shape requirements in the way they use light.For example, the illuminated surfaces of spatial light modulators (SLMs), used in both optics research and consumer display projectors, have a rectangular form factor.A variety of shapes bounded by steep edges are desirable in laser cutting or engraving.In two-photon optogenetics research [3], one would like to selectively illuminate intricate patterns of dendrites or axons within neurons, preferably with minimal noise or speckles.
Despite the diverse shape demands, laser sources typically exhibit a Gaussian profile.Shaping a Gaussian beam with the commonly practiced simple hard truncation, i.e. amplitude modulation, is inefficient.For example, around 70% of the incident power can be lost when illuminating a rectangle with an expanded Gaussian beam [4].To complicate matters, this wasted power could contribute to device heating which can either shorten the device lifespan or require even more power if active cooling is employed.Besides the obvious disadvantages of inefficiency, the high price tag of advanced laser sources, such as pulsed or For static beam shaping, several solutions based on phase-only methods exist for efficiently transforming a Gaussian beam into rectangular, circular or other simple patterns.These include engineered diffusers, microlens arrays or homogenizers [5,6], refractive mapping [7], diffractive optical elements (DOE) [8,9] or phase plates [10,11].Engineered diffusers, microlens arrays and homogenizers work similarly by sampling an incident beam as a collection of beamlets that are then redirected to form an output shape.These approaches, however, are more suitable for incoherent light as the recombination of randomly phase shifted beamlets would create interference effects [12], resulting in speckled or grainy output intensities.Refractive mapping operates using a similar principle but redirects rays without introducing random phase shifts, giving the transformed output beam a well defined wavefront.DOEs or single phase plates use Fourier optics principles and thus directly transforms a Gaussian to a sinc or Airy disk-like distribution which, in turn, becomes a rectangle or circle in the far field or after an additional lens.The quality of the transformed beam depends on how well the sinc or Airy distribution is approximated, and is thus sensitive to the input Gaussian which contributes convolution effects that blur the edges of the shaped output.
Our proposed technique, the Generalized Phase Contrast method (GPC), belongs to a class of non-absorbing common path interferometers [13].A phase-only aperture directly representing the desired output intensity is imaged through the interference of its high and phase-shifted low spatial frequencies.This is achieved by phase shifting the lower spatial frequencies through a phase contrast filter (PCF) at the Fourier plane (Fig. 1).GPC could thus be implemented with binary phase plates that are far simpler than those used by other Gaussian transformers as demonstrated in [14] with wet etched Pyrex.Binary phase plates are also easier to mass-produce with standard foundry processes common for silicon devices or microelectronics.When the phase mask and PCF are designed to give the same phase shift, both can even be fabricated from a single wafer.Unlike DOEs, GPC uses the target shape to directly interface with the incident Gaussian, instead of the target's Fourier transform.This makes GPC robust to input beam variations.The use of common path interferometry renders steep well-defined edges in the shaped output.Furthermore, the target output shapes could easily be replaced without increasing the fabrication complexity of the phase aperture or PCF.manipulation, and two-photon optogenetics.Depending on the requirements, digital holography (DH) [15,16] and GPC [17] are the main options for phase-only beam shaping.Digital holography usually employs a focusing configuration, such that the output is the Fourier transform of light modulated by the SLM.This makes DH ideal for creating 2D or 3D spot arrays useful for optical tweezing [18] or photo stimulation at different planes [19].A focusing geometry with a fixed illumination, however, is inherently prevented from generating contiguous light patterns desirable for some applications.Extended intensity patterns formed by aggregating spots with differing phase values and overlapping point spread functions thus results in speckles that resemble noise [20].The intensity fluctuations in speckled extended intensity patterns become a problem when they are enhanced by twophoton excitation such as in direct laser writing [21] or in two-photon optogenetics [3].
With its advantage of contiguous, speckle-free patterns and computationally simple SLM encoding, GPC therefore finds uses in dynamic applications such as optical trapping and manipulation [1,22,23], and two-photon optogenetics [2].Unlike speckled or discontinuous patterns, light distributions with contiguous intensity and phase remain localized while propagating enabling extended optical manipulation [1,22,24].Instead of a focusing geometry, GPC uses an imaging geometry, hence avoiding dispersion effects which makes it advantageous for use with multiple wavelengths [25] or temporal focusing [2,3].
In practice, GPC generated light distributions resemble that of simple amplitude modulation.Both are characterized by sharply outlined patterns with contiguous phase and intensity.However, these techniques are opposites when it comes to photon efficiency.GPC's photon efficiency is typically over ~80%.On the other hand, amplitude modulation typically has a low efficiency, directly proportional to the encoded pattern's fill factor and also dependent on the modulating device (e.g.LCoS or DMD).
Traditionally, GPC is used to transform top hat illumination into a plurality of intensity profiles [26].Obtaining the initial top hat input, however, already removes a large fraction of the incident light unless employing another efficient beam shaping method like the ones mentioned earlier.Directly using Gaussian illumination for dynamic GPC applications is therefore an attractive alternative for delivering more power into beam shaping experiments.
Given the applications and advantages, we therefore analyze GPC for efficient use with Gaussian illumination.In addition to output contrast optimization developed in [4], we also analytically determine the conditions for optimizing output efficiency.This additional constraint simplifies the task of choosing the phase mask and PCF combinations, hence making it easier to implement a GPC system that delivers a consistent shaping efficiency and intensity gain over a wide variety of projected output profiles.Our mathematical analysis will be discussed in the succeeding sections.Section 2 reviews GPC output contrast optimization applied to Gaussian illuminated GPC, followed by efficiency optimization that we introduce in Section 3, then demonstrate for rectangular phase masks in Section 4. Section 5 presents numerical experiments using analytically optimized circle and rectangle phase masks.Section 6 extends to arbitrary patterns such as those found in biological experiments.Section 7 summarizes this work and gives an outlook for improvements and applications.

Optimizing GPC for output contrast
We now mathematically analyze the 4f setup depicted in Fig. 1.The field at the input plane can be described as where a(x,y) is an amplitude profile that arises either due to the illumination beam, or from a limiting aperture and ( ) the phase sensing case with the crucial difference that the phase information, ( ) , x y φ , is now user-defined and, hence, fully reconfigurable.The optical Fourier transform on the phaseencoded input light would then be located at the filter plane where the phase shifting PCF is applied.The transfer function of such PCF with a circular θ-phase shifting region has the form, ( ) ( ) where f x , f y and f r are respectively the abscissa, ordinate and radial spatial frequency coordinates.Note that we have dropped the absorption factors originally present in the wavefront sensing filter [27] to ensure optimal energy throughput.As will be outlined later, we will instead exploit available freedoms at the input and filter for optimization.The associative groupings in Eq. ( 2) are chosen to explicitly model how the filter generates a synthetic reference wave (SRW).The first term in the filter simply transmits the Fourier components and, hence, projects an inverted copy of the input at the output plane.The second term is a low pass filter whose cutoff frequency, Δf r , is the radius of the PCF's phase shifting region.At the output plane, the low-pass-filtered image of the input phase variations, scaled by a multiplicative complex factor, [exp(iθ)-1], serves as a reference wave for the directly imaged input pattern.Thus the synthesized intensity pattern at the output plane is formed from the interference of an inverted copy of the original input and the low passed image acting as an SRW Here, we have used an approximation for the SRW, ( ) ( ) , where the spatial profile ( ) ', ' g x y is the low passed version of the un-modulated input light scaled by the strength of the normalized zero th order, α , that would take input phase modulations into account On the optical axis, optimal contrast in the interferogram is thus obtained when the two terms in Eq. (3) have matching amplitudes, which is satisfied when

GPC with Gaussian illumination
To proceed with our analysis we set the illumination to follow a radially symmetric Gaussian profile with a 1/e 2 waist, w 0 ( ) To exploit the symmetry, we would, for now, assume that the phase mask is circular.We also assume that both phase mask pattern and PCF imparts π-phase shifts on the transmitted light.This allows us to conveniently express the phase modulation as a change in sign in the amplitude and deal with only real numbers.When evaluating Eq. ( 4), we notice that g(r') is a Fourier transform of a truncated Gaussian.Evaluating this Fourier transform is not straightforward, thus different approximations have been presented in the literature [28].Nonetheless, the central value can be obtained analytically Here, we have defined η as the ratio of the PCF phase shifting radius to the Gaussian waist at the Fourier plane, w f , when the wavelength is λ and the focal length is f.
( ) For a π-phase shifting circular phase mask with radius Δr, the modulated input could be expressed as Since this also involves a truncated Gaussian, the evaluation of α is similar to g(r´ = 0) where we defined the dimensionless ζ as the ratio between the phase mask radius and input Gaussian waist, 0 .r w On the optical axis, we can express Eq. ( 6) using Eqs.( 8) and (11) giving the condition for optimal contrast Although this derivation is for a circular phase mask, extending to any shape is a matter of finding the corresponding α .This can also be analytically derived for rectangular phase masks as we would later show, but in many cases involving arbitrary geometries, α would have to be derived via numeric integration.

Optimizing GPC for photon efficiency
For a beam shaping system, efficiency (eff) is measured as the energy within the target output shape, S, divided by the overall incident energy, ( GPC eff , , .

S I x y dxdy a x y dxdy
=   Since the exact analytic form of the intensity is not readily available, we take a different approach where we look for phase mask and PCF configurations correlated with what is numerically found to be the most efficient (Fig. 2(a)).We find that efficiency is maximized when the first zero crossing of its Fourier transform coincides with the PCF radius, Δf r .Conceptually, this could be understood by working backwards, starting with the desired output shape of a GPC system.The region from the filter plane to the output plane can be treated as a 2f focusing geometry as in DH.Hence, if a circular output is desired, this means, that the filter plane should look like an Airy disk-like function (green plot in Fig. 2(b)).When we now consider GPC's input plane, light outside of the desired shape, i.e. the peripheral Gaussian envelope, would perturb the central part of the desired Airy-like distribution at the filter plane.These low frequency perturbations reemerge at the output as light outside the desired shape.With an idea of how the Fourier distribution should look like, we thus adopt how DH applies phase constraints to get a desired Fourier transform output [29], or how matched filtering GPC uses concentric rings to emulate plane wave focusing and, consequently, output focal spots [30].For the circular pattern, the deviations from the ideal Airy-like function are minimized when the PCF's radius coincides with the zero crossing at the central region at the Fourier plane.Applying a π-phase shift within this region inverts the sign of the low frequencies, making the Fourier distribution more similar to the desired Airylike function.To obtain a simplified analytic expression for this efficiency condition, we assume that the Airy disk function has a negligible curvature within the phase shifting region, f r ≤ Δf r .At this region, the Fourier transform of Eq. ( 10) is approximately This is illustrated in Fig. 2(b), where the displaced Gaussian (blue plot), approximates the Fourier transform (red plot) at low frequencies.To make the PCF radius coincide with the first zero crossing, we thus impose ( ) ( )

Optimizing contrast and efficiency
Solving for ζ and η from Eqs. ( 13) and ( 16) gives us the optimal parameters for a circular phase mask Numerically evaluating the GPC output from this ζ-η pair gives an efficiency of ~84% and a gain of ~3x relative to the input Gaussian's central intensity (see Table 1).To generalize to arbitrary shapes Eqs. ( 13) and ( 16) can be expressed in terms of α instead of ζ, giving ( ) These can be simplified further by solving for α and η, resulting in 1 / 2 0.7071, ( ) These two equations summarize the conditions for an optimally performing GPC system under Gaussian illumination.The phase mask's geometry is embodied in α , which can be tweaked in different ways such that Eq. ( 21) is satisfied.The fixed value for η in Eq. ( 22) means that a reconfigurable GPC system with a fixed PCF will still perform optimally with different phase masks satisfying Eq. ( 21).The succeeding sections use these two equations to optimize Gaussian GPC with rectangular and arbitrary patterns.

Extending to rectangular apertures
Gaussian illumination encoded with a π-phase shifting rectangle with dimensions W × H can be expressed as (cf.Eq. ( 10)) To optimize a GPC system using rectangular phase apertures, we first identify α .Using Eq. ( 23) to evaluate Eq. ( 5), noting that the x and y dependence are separable and that the rect functions can be treated as integration limits, results in an expression for α involving the error function, erf(x), ( ) ( ) Here we defined the aspect ratio, / using Eq. ( 24), except for a square, A R = 1, which gives For other aspect ratios, ζ Rect can be found numerically or by graphically looking for the intersection of the plots of Eqs. ( 13) and ( 16) which we will show here.Using the form of α for rectangular phase apertures in Eqs. ( 13) and ( 16), we obtain ( ) For plotting, these two equations can be rearranged to give η in terms of ζ Rect ( ) ( ) Figure 3 shows the plots of Eq. ( 28) in solid lines and Eq. ( 29) in dashed lines.A R is chosen from common video display aspect ratios.The plot is zoomed at the intersections which occur at η = 1.1081, as implied by Eq. ( 22).The numeric values of ζ Rect at these intersections are listed in Table 1 (to 4 decimal places).Fig. 3. Optimal ζ Rect for rectangular phase masks with different aspect ratios are found where the solid (Eq.( 28)) and dashed lines (Eq. ( 29)) with the same color intersect, or where either of these lines intersect with η = 1.1081.

Numerical experiments with circular and rectangular phase apertures
Numerical results for a circle and different rectangular aspect ratios are summarized in Table 1.These were obtained using an 8192 × 8192 sample FFT with w 0 = 240.7957samples such that Δf r is an integer value, ηw f = 12 samples.GPC efficiency is defined as in Eq. ( 14) and the gain is defined as the central intensity at the output (input central intensity is unity).Since discretization errors prevent ζ or ζ Rect from being represented accurately, we also list their effective values when integer rectangle sizes are used.The energy savings (E.savings) in the last column is defined as the energy saved when replacing an amplitude masking system with a GPC system that gives the same brightness.This definition is illustrated in Fig. 4 where both light shaping techniques are used to deliver 84 watts within a rectangular region.While an 84% GPC system would require 100W and lose 16W, a 28% efficient hard truncated Gaussian would require 300W and lose 216W.Hence, using a GPC system saves 200W or 93% of typical photon energy losses.Mathematically, we thus define the energy savings as ) ( )

Optimally scaled arbitrary patterns
Gaussian GPC need not be constrained with patterns that can be dealt with analytically.In fact, it works best with arbitrary patterns that have high spatial frequencies, thus diverting light from the Fourier zero order, and reinforcing the validity of the Eqs.( 19) and (20).Instead of analytically convenient circ or rect functions, we consider an arbitrary binary bitmap image, b(x, y), having values 0 and 1, as our aperture.Assuming the binary image is mapped to 0 and π phase shifts on an incident Gaussian, we can numerically evaluate and scale b(x, y) such that In our simulations we first start with a large bitmap and optimize w 0 which is easier to change.Once ( 31) is satisfied, we revert to the original w 0 and then scale the image preserving its optimal proportion with w 0 .Results for various optimized patterns are shown in Fig. 6.  3.12 93.24% Fig. 6.Intensity profiles of various arbitrary shapes scaled to satisfy Eq. ( 21).Corresponding efficiencies, gain and energy savings are also shown, and are consistently ~84%, ~3x and ~93% respectively.

Dynamic and arbitrarily sized excitation patterns
In dynamic experiments, scaling the light pattern is often not an option.Such restriction usually applies when light has to interact with manipulated objects or biological samples.
Nonetheless, it is possible to keep α optimal by addressing an additional outer phase ring such that Eq. ( 21) or ( 31) is still satisfied.This is similar to what is done in [2] for top hat illuminated GPC.By integrating similar to Eq. ( 8), the inner radius of the compensating ring could be found, ( ) If desired, an output blocking mask with an aperture radius of ~1.386w 0 can be applied (obtained by dropping the inner integral).We note however that the intensity beyond this radius is considerably lower than that in the utilized region.Results for ring compensated show the possibility to optimally illuminate a cell that is branching out.We observe that the gain tends to be higher with a less efficiency-optimized GPC setup.This counteracting behavior of intensity gain and photon efficiency helps keep the energy savings at around ~85-93%.

Summary and outlook
We have analyzed GPC with Gaussian beams to obtain phase mask and PCF configurations that give optimal contrast and efficiency for a wide variety of user desired patterns.Our results thus simplify the task of implementing GPC for Gaussian illumination for simple circle and rectangles and more complex arbitrary shapes.Furthermore, our derivations show that a GPC system could be reused with a fixed PCF in tandem with a variety of interchangeable phase masks and still maintain desired efficiency and gain levels.Numerical experiments with optimized configurations consistently give ~84% efficiency, ~3x intensity gain and ~93% energy savings compared to the commonly implemented hard truncated expanded Gaussian.Results also indicate robustness in terms of contrast and energy savings.As a first step to optimization and due to the potentially scalable simple fabrication, we have only considered π-phase shifting binary phase masks and filters and relaxed constraints on the flatness of the output intensity.Future work will therefore also consider flattening the output intensity by encoding a counteracting curved phase profile [31].The energy saved by using GPC makes it attractive for many applications wherein light is best utilized in a particular shape, e.g.rectangles for SLM or display illumination, circles for laser materials processing or even intricate biological patterns found in research.

Fig. 1 .
Fig. 1.A GPC system efficiently transforming an incident Gaussian beam into a bright rectangle.Besides a standard imaging or telescopic 4f setup formed by the two Fourier lenses, GPC uses a simple binary phase mask at the input and phase contrast filter at the Fourier plane.Coupled with dynamic phase SLMs, the efficient generation of arbitrary light intensity patterns is also desirable.Applications include machine vision, optical trapping and

FourierFig. 2 .
Fig. 2. (a) Color contour plot of numerically obtained efficiency as a function of (ζ, η).The black crosses mark the highest efficiency for a given ζ.The blue plot corresponds to our condition for the PCF radius to coincide with the first zero crossing of the Fourier transform.(b) The Fourier transform of the phase-only aperture (red plot) can be approximated with a displaced Gaussian (blue plot) near the PCF phase shifting region.The inverse Fourier transform of the ideal output (green plot) is also shown for reference.(The x and y axes are normalized to w f and πw 0 2 respectively.) Rect for rectangular phase apertures as half the width divided by the input Gaussian waist,

Fig. 4 .
Fig. 4. Comparison of GPC light shaping to a hard truncated Gaussian delivering 84W on identical rectangular areas.Being only 28% efficient (a), the truncated Gaussian requires 300W and loses 216W (b).The GPC light shaper requires only 100W, saving 200W (c).

Figures 5 (
Figures 5(a)-5(c) show GPC output for a circle, square and a rectangle with 16:10 aspect ratio using optimized parameters listed in Table 1.The corresponding efficiencies, gain and energy savings are also shown for each shape.The corresponding line scans are shown in Figs.5(d) and 5(e).

Fig. 5 .
Fig. 5. GPC intensity outputs for circle (a), square (b), rectangle (c).The scale bar in (b) is twice the 1/e 2 Gaussian waist, and tick marks in (a)-(c) are separated by half the Gaussian waist.Efficiencies, gain and energy savings are also shown, and are consistently ~84%, ~3x and ~93% respectively.The corresponding intensity line scans are shown in (d)-(f).The x-axis is normalized to w 0 .

Fig. 7 .
Fig. 7. (a)-(c) Intensity profiles of various neuron-inspired shapes, directly drawn without scaling, but α-compensated by an outer phase ring.(d)-(f) Intensity profile for a pattern that is branching out.Whereas the efficiencies and intensity gains are highly pattern dependent, the energy savings stays at around ~90%.